URGENT: Getting app module service method result and calling web service??

We have a .jar from another vendor that allows us to interact with an FOP rendering process. This .jar has methods that allow us to pass several parameters which results in the creation of the PDF which is stored in the database.
We need to create the XML, which we've done, via view objects and a method in our application module. The developers at this point, have placed the code to call the service method into the model code that generates the XML. The actual .jar file for this is in the viewcontroller area.
Is this a "reasonable" approach? ( that is, importing view object jar in model)
The web service needs to have several parameters sent to it, most of which are configured in the web.xml. They are now being passed via a data action to the model's service method.
Shouldn't the data action be written more like the following - note: some questions in here as well...
public void onShowPdf( DataActionContext ctx )
// note, you can get here from 5 different places in the application and we need to be able to retrieve the bindings from these separate places for proper generation... how??
AppModule am = (AppModule) getAm();
String strXML = am.getXML(...);
// get web.xml values from session context...
PDFArchiver stub = new PDFArchiver();
stub.generate( send prms here );
// the next page just needs to have 3 of the parameters exposed from this page to yield the results of the generated pdf (retrieve from db)
// what would be the best way to get the parameters over there?
} // onShowPDF
after this data action, it simply forwards to the next page, which has a frame to display the pdf with an [ok] button at the bottom. The pdf is rendered via a Servlet.
one last question...
Right now, the service method was dropped on the data action, and it is automatically invoked ( we've bound the 8 parameters to it by over-riding initializeMethodParameters). If we were to switch it so the method RETURNED the XML, how would we get the results back while INSIDE A DATA ACTION? I could see if we called it by invoking a service method from the app module instance, but how do you do it in the lifecycle of the data action??
Whew, that's all the questions for now.
Any help, again, would be GREATLY appreciated.

Most of the items in this previous post have been addressed. The one problem that remains is that we use a servlet to display the PDF. The servlet reads 3 parameters from the URL to send to a service method that reads and streams the PDF to the browser.
HOWEVER, the user can view source and then paste parameters into the URL and view whatever he wants. So:
1. How can we prevent the servlet parameters from being seen inside the source? OR, how can we simply prevent the user from invoking the view pdf servlet with other parameters?
2. We've temporarily, written a data action (displayPDF) which has no service method. In the findForward data action, we grab the bindings that the servlet needs from other pages (4 different binding containers), then invoke the service method and write the data to the response object. This seems to work. So, our page has an iframe with the src="displayPDF.do".
Again, should this be done another way? Seems strange to have a data action that "acts like a servlet"...
Thanks for feedback.

Similar Messages

  • Define Web Services in XI and call Web Services from XI

    Xi guys,
    I want to create some Web services in XI that will do the following things:
    receive an XML message over SOAP (from BEA WebLogic), execute 2-3 calls to an external HTTP Web Server from which I will get a response, export a file into another system, and return the response to the WS client.
    As far as I know, I will have to create a Configuration scenario in XI that will contain all these steps (obviously with the help of BPM) and with the help of the Wizard, I will produce the WSDL, the function of which the Web service client will be able to call. I have some questions on that:
    a) Is there a way to define with XI only one Web Service that will contain 3-4 function to do different things? Or one Web Service corresponds to one Configuration scenario?
    b) Also do I need a Sender Agreement and a Sender SOAP communication channel?
    c) Is there a way to construct the WSDL before creating the configuration scenario? Because BEA WebLogic people need it to start development.
    Best Regards
    Evaggelos Gkatzios

    hi,
    a) Is there a way to define with XI only one Web Service that will contain 3-4 function to do different things?
         Or one Web Service corresponds to one Configuration scenario?
    b) Also do I need a Sender Agreement and a Sender SOAP communication channel?
      Ans:
         If you are create a SOAP communication channel and Sender Agreement then One WSDL used
         One Configuration scenario.Another configuration you need to create another WSDL.Because at the
         time of creating WSDL you need to give a service name and communication channel.
         If without communication channel(using proposal consept creating WSDL) you can use that various
         senarios if your sender structure is same.(this time WSDL have the pipeline address with help
         of  message interface  fine the mapping and gave the output).
         If you create with SOAP communication channel and Sender Agreement WSDL is more secure.
         with out communication channel is not a secure one.
         If you go with (without sender CC) you can create and gave a WSDL before Scenario.
         If you have sender CC then after creating a scenario only you can able to gave WSDL.
         If you are createing with sender cc then you need to give a URL
         [http://<host>:<port>/XISOAPAdapter/MessageServlet?channel=:SenderService:SenderCC]
    *Reward Points If Helpful*
    Regards,
    Prakasu

  • How do i call web services from SAP ABAP

    Hello,
    Ian working with .net team. they are using sap .net Connector to connect SAP. But my job is In SAP side when Purchase Requisition is created, I have to call web services from ABAP and i have to pass the Purchase Requisition number to web service(.net Program). Please help me how to call web services from ABAP and how to pass value. Any one help me with example.
    Thanks
    RaviKumar

    Hi Ravi,
    If you can call EJB from ABAP and from EJB call Web service which you want to call. I am giving code to write in EJB business method processFunction.
    public void processFunction(Function function) {
       IRepository repository;
       repository = new Repository("TestRepository");
       JCO.MetaData fmeta = new JCO.MetaData("ZTEST_EJB");
       fmeta.addInfo("REQUTEXT", JCO.TYPE_CHAR, 255,   0,  0,  
       JCO.IMPORT_PARAMETER, null);
       fmeta.addInfo("ECHOTEXT", JCO.TYPE_CHAR, 255,   0,  0,
       JCO.EXPORT_PARAMETER, null);
       fmeta.addInfo("RESPTEXT", JCO.TYPE_CHAR, 255,   0,  0,
       JCO.EXPORT_PARAMETER, null);
       repository.addFunctionInterfaceToCache(fmeta);
       JCO.ParameterList input  =
       function.getImportParameterList();
       JCO.ParameterList output =
       function.getExportParameterList();          
       JCO.ParameterList tables =
       function.getTableParameterList();
      if (function.getName().equals("ZTEST_EJB")) {
                        output.setValue(input.getCharArray("REQUTEXT"),"ECHOTEXT");
    output.setValue("This is a response " + table.getString("E_NAME") +" " + output.getName(1), "RESPTEXT");
      else if (function.getName().equals("STFC_STRUCTURE")) {
      JCO.Structure sin  = input.getStructure("IMPORTSTRUCT");
      JCO.Structure sout = (JCO.Structure)sin.clone();
      try {
          System.out.println(sin);
       catch (Exception ex) {
           System.out.println(ex);
                        output.setValue(sout,"ECHOSTRUCT");
    output.setValue("This is a response from Example5.java","RESPTEXT");
    }//if
    Here REQUTEXT, ECHOTEXT are import parameter and RESPTEXT is the Export parameter of Function module ZTEST_EJB in SAP.
    Here from this bisuness method you can call web service which you want and give back the result of webservice to ABAP F.M.
    Regards,
    Bhavik

  • Calling web service slow in wls81sp6

    Hi, I call a .Net secure (https) web service in my ejb. It returns in couple seconds in wls81sp4. But since I upgraded to wls81sp6, every time it takes more than 1 minute to return. That's quite surprise. What's changed? How can I get the performance back?
    Things get worse when I need to call web service several times in one ejb call. Sometime if my data set is big I break into chunk and call web service in a loop. I always get timeout exception now. Is there anything special about wls81sp6 web service? Thanks

    Question is what technology of J2EE u are using!
    If it is EJB, then the fastest way would be to generate one more webservice and connect this one to WD.
    This way you also can check if the webservice delivers any data with the testing environment.
    Regards,
    Benny

  • ORA-28868 error when calling Web service over HTTPS from PL/SQL utl_http

    I am getting error message ORA-28868 error when calling Web service over HTTPS from PL/SQL utl_http PL/SQL package,
    when browsed through some of the messages they point to setting Oracle Wallet Manager.
    I am trying to connect
    Any idea on how to resolve this issue ?
    your input is appreciated.
    Thanks
    Ravi

    Duplicate post ... please ignore.

  • I get an web service error when trying enable web services. I have latest update and rebooted

    i get an web service error when trying enable web services. I have latest update and rebooted

    hi there philnj,
    could you help the community narrow troubleshooting by providing a little more information? Particularly what model printer are we dealing with?
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

  • After 4 days OK service, now I get NO SIM card installed message and no phone service!?

    after 4 days OK service, now I get NO SIM card installed message and no phone service!?

    Try removing your sim card, then reseating it:

  • I cannot get apps from the itunes store and there is a message that this apple id has not been used with the itunes store

    i cannot get apps from the itunes store and there is a message that this apple id has not been used with the itunes store

    I have the same problem and when I review my account and enter my cc info it tells me "Your request is temporarily unable to be processed. Please try again later." and this is day 5 of trying again later.  What the **** is the prob? It isn't the card bc it has plenty of $$$ on it.

  • Problem with java and flex web service

    Hi,
    I have a basic web service written in java using jax ws 2.1
    ri. I need to call it from Flex using the WebService class
    Annotations for the java web method :
    @WebMethod
    public void Login(
    @WebParam(name="server") String serverURL,
    @WebParam(name=AUTHENTICATE_HEADER,header=true,mode=WebParam.Mode.INOUTHolder<Authenticate Header>
    authHeader)
    When I try and call the service from Flex , it can't find the
    login method and attempts to call it fail. If I set the web service
    to RPC based using @SOAPBinding , the method is found but then
    there are issues with the authentication header.
    What do I need to do to get flex web services communicating
    succesfully with java ?
    Are there are any known compatibility issues ? Or guidelines
    for going about this ?
    Any help would be appreciated

    well Shay,
    i've used JDev's tools to developer and to deploy the web service: the war and ear files are automatically generates you to the end of the process.
    I have included all the files java and the compiled classes, but I do not have files jar.
    But don't works: if i create only one java class with all code inside then it works fine!!
    Daniele

  • Using InfoPath and the Web service GetUserProfileByName-An error occurred accessing a data source

    Hi, Everyone,
    I want to realize the function that when user fills out the infopath form the form can automatically get current users' name and I've searched that I can use the Web service GetUserProfileByName method. When I preview the form it is all right, however, when
    I fill the form online, it occurs this error as folllowing. Anyone knows why and how to solve this problem?
    Thanks forward!
    Warning
    An error occurred querying a data source.
    Click OK to resume filling out the form. You may want to check your form data for errors.
    Hide error details
    An error occurred while trying to connect to a Web service.
    An entry has been added to the Windows event log of the server.
    Log ID:5566
    Correlation ID:9c23d39c-18fa-1025-c7ec-600a1582a54a

    Hi,
    According to your post, my understanding is that you get error when using the Web service GetUserProfileByName in InfoPath.
    Have the InfoPath form template call web service in code? If yes, please see following KB and check if it is the cause.
    http://support.microsoft.com/kb/981684
    You can also
    follow the steps in the article to resolve this error in InfoPath. Please refer to:
    Auto Populate User Information in InfoPath with Claims Based Authentication in SharePoint – Part 2 of 3
    In addition, you need to disable the Loopback check.
    Here is a similar thread for your reference:
    https://social.technet.microsoft.com/Forums/en-US/d6d20308-a5d0-45fa-881d-0626c68c4e73/infopath-an-entry-has-been-added-to-the-windows-event-log-of-the-server-logid-5566?forum=sharepointcustomizationprevious
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Creating and deploying web services

    Hi,
    I am new to java.
    I have created an EJB in NetBeans 5.5 that contains a web service (From one of the web service tutorials - CalculatorWSApplication).
    The EJB compiles fine and deploys fine.
    I am using the Sun's Server Platform Edition 9.0 Admin Console.
    I created a connector connection pool and a connector resource which uses that pool. Then I created a registry with the Publish URL and the Query URL = http://localhost/services/uddi/v3/protect/publishapi (same as the example on the registry page (except for http instead of https).
    When I try to publish the web service using the registry I just added I get the message: "Bad response: (405Method not allowed"
    As I said, I am very new (started this week) to java and all the java tools so please give me the answer in baby steps, thanks :)
    Justin

    Hi, Saiah
    Thanks for getting back to me.
    I created a servlet with a doPut() method and it ran fine.
    I also downloaded JBoss to see if it'd be easier for me to work with, still need a lot of knowledge for that to be useful :)
    Maybe I'm completely on the wrong path, this is my problem in a nutshell:
    Using NetBeans IDE 5.5 and following the web services tutorial (http://www.netbeans.org/kb/50/quickstart-webservice.html) when I get to the part "Consuming the Web Service" it tells me to call a web service operation ... when I do this I get a dialog box saying "Select Operation to Invoke" with "Available Web Services" beneath that ... in this dialog I should be seeing a list of web services (inc the ones I have created) but it is completely empty.
    Do you have any idea what the problem could be, was I on the right path trying to publish it to the registry?
    Thanks,
    Justin

  • Getting error while using HTTP connector and calling POST action to a Web API which is deployed as website on Azure

    I have create Logic App under Azure App Services, I am getting
    error while using HTTP connector and calling POST action to a Web API which is deployed as website on Azure.
    Following are the screen shots:
    Login App Connector Diagram:
    hema

    Marking as answered since no response on request for more information - assuming that you found what was wrong in the inputs. Let us know if you're still having trouble.
    http://twitter.com/joshtwist

  • JDeveloper and Database Web Service Connection

    Hi all,
    I'm trying to publish a Java class as a web service. However, I'm getting the following error for the sample code below. Please help me out pubish this class as a Web service.
    The error:
    No methods were selected. Select one or more methods to publish as a web service.
    My code is below:
    package hr;
    import java.sql.Connection;
    import java.sql.SQLException;
    import oracle.jdbc.pool.OracleDataSource;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import oracle.xml.sql.query.OracleXMLQuery;
    import oracle.xml.parser.v2.*;
    public class DataHandler {
    public DataHandler() {
    String jdbcUrl = "jdbc:oracle:thin:@127.0.0.1:1521:orcl";
    String userid = "hr";
    String password = "mohammed";
    Connection conn;
    Statement stmt;
    ResultSet rset;
    String query;
    String sqlString;
    public void getDBConnection() throws SQLException{
    OracleDataSource ds;
    ds = new OracleDataSource();
    ds.setURL(jdbcUrl);
    conn=ds.getConnection(userid,password);
    public ResultSet getAllEmployees() throws SQLException{
    getDBConnection();
    stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
    ResultSet.CONCUR_READ_ONLY);
    query = "SELECT * FROM Employees ORDER BY employee_id";
    System.out.println("\nExecuting query: " + query);
    rset = stmt.executeQuery(query);
    return rset;
    }

    Dear dvohra16,
    Thank you for the great book you're recommended. It's really a powerful tool that makes things much better for me.
    I've noticed that you're the author of this book. I'm really honered to discuss with the problems I have and
    I'm so lucky to get your responses for my questions.
    My current question is based on this book. How do I orchestrate a web service that inserts into an oracle database table and a web service that reads
    the contents of that table?
    In other words, the first web service inserts some values into a table and the second should read these values.
    So, how does BPEL orchestrate these web service such that the output of the first one is the input of the second?
    Your assistance is truly appreciated.
    Thank you for your time.

  • Debug and log Web Service

    Hello,
    i have a problem regarding web service. I wrote a web service (adapted to my needs) as described in the tutorial for java. But when it comes to testing, the web service throws an exception. The method itself is fine (tested and debugged with a local test client).
    The question is, is there a way to debug the web service or is there a logfile in which the exception is described in detail?
    Thanks in advanced for all replies
    regards,
    Rene

    Hi Rene,
    There is quite a bit of posting in this thread, and as described in the forum hints, that could discourage some people from reading. Maybe if you post the most recent problem in a new post, that will attract more attention.
    To your problem, or more likely to the several problems you are having in this thread - the exceptions and its stacktrace should be seen in the server log files.
    These are found at something like
    :\usr\sap\<sid>\<id>\j2ee\cluster\server<number>\log
    It's hard to say where exactly the exception would go without knowing your application, but I would guess that the likely candidate should be the latest defaultTrace.trc file.
    If it's not there you may try to copy everything from there in a new location, reproduce the exceptions and check what files have increased their size. There you should see some information what is wrong.
    The other way you could deal is to attach via debugger like Benny has suggested, if you have the server already in a debug mode, just connect with the IDE, put a breakpoint in your code before you have invoked the web service, then trigger your code somehow and trace the execution.
    The IDE has also the possibility to make a breakpoint on any unhandled exception, there is such button in the debug view. You may try switching it on.
    If you want to invoke your bean from a standalone client and see the result, but you are unable to lookupi the JNDI name, then you should double check what exactly JNDI name you are supplying and under what name is your bean. The easiest way is to login at the server telnet administration (telnet 127.0.0.1 50008)
    (The telnet port should be the same as the HTTP on your server but with 8 as last digit), then execute those commands :
    jump 0
    add naming
    lsn > c:\my_naming.txt
    you should see in a nice way the JNDI tree on your server and you can check where is your bean and how it should be invoked. However I would personally not go to writing standalone program to see the exception. It sounds like less efforts to try some of the other suggestions.
    Btw, ideally, you should be able to code your application so that exceptions are reported in a nice way and you are sure where they are going. For example if your front end is a HTML, then a classic approach is to have an error page where the exceptions will be printed so that you don't have to search logs or debug the server.
    HTH
    Peter

  • How to make a PDF form call Web service and return a static pdf for user to print?

    Hi all,
    Can anyone help me regarding the feasibility of using PDF forms for my following case?
    I would like to create a Dynamic pdf form. User only have the Acrobat reader. they can enter some information. Then have a submit button. when user click the submit button, it can call the web service with data. then Web service returns a Static PDF document based on data and the user can print it out. (and maybe save as separate pdf file)
    1. Is that possible to implement? Because I know PDF can call web service, but dont know how it handle when the webservice returns another static PDF document. could it able to handle the responds and open up in another acrobat reader?
    2. As I understand I need to have Live Cycle Designer to create a pdf  and make it Reader Enabled. So user can user reader to call webservice? am I correct?
    3. What minimum reader that user need to have? PDF reader 7 or above?
    4. I have a webservice serve the same purpose for web. But if I want the same web services can serve both web and PDF form. So, whatever client (PDF or Web)make the web service call, server returns the PDF document to client. Is that possible ? Do I need to make any changes on web service?
    5. Do I need to get any other Adobe server product? (other than Live Cycle Designer )
    Thanks a lot

    We have done a similar approach in the past and yes, it can be doable.
    1. Is that possible to implement? Because I know PDF can call web service, but dont know how it handle when the webservice returns another static PDF document. could it able to handle the responds and open up in another acrobat reader?
    Srini: We have developed a Servlet to talk to Webservice. Based on the Webservice response, the Servlet, prepares the Byte stream and sends it to Webbrowser to display as a PDF. The PDF data was submitted to Servlet in XML format.
    But if you do not want to use the above approach, then you have to use the Workbench Process.
    Submit the PDF data to a Workbench process and the inside process, execute Webservice Service with the data. Once the response is received, prepare the data XML and render a PDF with it.
    To do this, you need LiveCycle Server and Reader Extensions server component.
    2. As I understand I need to have Live Cycle Designer to create a pdf  and make it Reader Enabled. So user can user reader to call webservice? am I correct?
    Srini: If you want to use the Servlet, you can Reader extend the PDF with Acrobat.. But if you want to submit the data directly to Webservice, then you need Reader Extensions server component.
    3. What minimum reader that user need to have? PDF reader 7 or above?
    Srini: Not sure but Reader 8 and above should work.
    4. I have a webservice serve the same purpose for web. But if I want the same web services can serve both web and PDF form. So, whatever client (PDF or Web)make the web service call, server returns the PDF document to client. Is that possible ? Do I need to make any changes on web service?
    Srini: If you use the Servlet approach, then you can re-use the same webservice. But if you want to submit directly to the same webservice, you may need to change it to suit your data XML.
    5. Do I need to get any other Adobe server product? (other than Live Cycle Designer )
    Srini: If you use the Servlet approach, you do not need any server component but other approach, you need Livecycle Server and Reader Extensions server component.
    Thanks
    Srini

Maybe you are looking for