Web service and servlets in the same project...web.xml?

Hello, I have a problem with my web service.
I have a server, which displays a web service. I programmed this service with JAXRPC.
I have a client, in another directory. I succeded in compiling, deploying and running the web service.
The problem is that after I tried to integrate this service in an existing project. This project contains servlets. In these servlets, I'm using sessions.
These servlets are on the same side as the server of the web service. Because of the implementation of my code, I'd like to use in the class that represents the server of the service, the same session as the one I'm using in the servlets.
But of course, it's not working by itself. I know there's something to do with the web.xml files.
The thing is that I created a web.xml file for the service, and another for the servlets.
I was thinking of joining both of them in one xml file, but everything crashes then...
Could someone tell me how to create a project with a web service and servlets, and mostly how to configure the xml file??
Thanks for any help
Philippe

Hello, I have a problem with my web service.
I have a server, which displays a web service. I programmed this service with JAXRPC.
I have a client, in another directory. I succeded in compiling, deploying and running the web service.
The problem is that after I tried to integrate this service in an existing project. This project contains servlets. In these servlets, I'm using sessions.
These servlets are on the same side as the server of the web service. Because of the implementation of my code, I'd like to use in the class that represents the server of the service, the same session as the one I'm using in the servlets.
But of course, it's not working by itself. I know there's something to do with the web.xml files.
The thing is that I created a web.xml file for the service, and another for the servlets.
I was thinking of joining both of them in one xml file, but everything crashes then...
Could someone tell me how to create a project with a web service and servlets, and mostly how to configure the xml file??
Thanks for any help
Philippe

Similar Messages

  • Web services and servlets in same context

    I would like to provide web services and servlets under the same context, where the servlets are handled by a controller mapped to multiple urls.
    If I map the servlet controller with
    <url-pattern>/servlet</url-pattern>
    then /prjServ/servlet works in a browser but of course any other urls (eg /prjServ/servlet/fred) do not.
    If I change the web.xml to be
    <url-pattern>/servlet/*</url-pattern>
    all attempts to access the servlet get requested resource not available.
    The web service continues to work fine whichever mapping I use for the servlet (the web service is /prjServ/mlm).
    Does the web service handling affect the way I can map the servlets?

    No, it should not. For the JAXRPC SI, the web services are implemented
    via one common servler.

  • Java app with web service and servlets

    Hi. I intend to make a java application which exposes some methods as a web service and as jsp/servlets. It's core functionality is not really web centric, but its more a java app with a web tier. I am not sure about how the architecture of such a system would look like using the java platform. I currently see three options:
    1. Run everything in a servlet container like tomcat. I hesitate to do this because i would be putting a lot of functionality which isn't about the web into a servlet container. Also, I have a lot of application scope data that is maintained and shared by all servlets/web services. However, it would be really easy just to put everything into tomcat and use ServletContext to maintain some global objects.
    2. Use a Java EE to seperate application/business logic and data access into session beans and entity beans. I hesitate to this because it seem a bit overkill because the system isn't very big or complex right now. It also means that I would have to learn to use EJB's instead of just using some POJOs.
    3. Run the web tier in a servlet container and the main app in a separate JVM, and then connect the tier by sending serialized objects over TCP sockets. I don't like writing network code but at least there is some separation of the tiers.
    What would you do? Maybe I have overlooked a much better solution to the problem?
    Let me just say that the system is the product of a student project spanning one semester, so it's important to choose the RIGHT solution (architectural-wise) instead of the something quick and dirty that is hard to defend.

    jschell wrote:
    Run everything in a servlet container like tomcatTomcat is a JEE container.Now I am confused. Maybe you mean Glassfish? Tomcat is definitely a web container(?).
    Let me just say that the system is the product of a student project spanning one semester, so it's important to choose the RIGHT solution (architectural-wise) That pretty much makes it impossible then.
    1. A "Right" solution is generally only proven by time.
    2. It requires a great deal of knowledge about the business domain.Yeah, you are right. Let be try to rephrase it. What solution (pattern) would be considered the most common or appropriate when you have a Java App and want to expose a few methods as a website and web service?
    I hesitate to do this because i would be putting a lot of functionality which isn't about the web into a servlet container. Also, I have a lot of application scope data that is maintained and shared by all servlets/web servicesHuh? Do you already have an exposed web service? If you already have a server which other clients communicate then where does this functionality that you don't want to be tomcat running now? Or where do you think that you want to run it? And if you are or do run it somewhere else then tomcat could access it the same way any other client accesses that server.Sorry, that sentence was written badly. I don't have anything right now. What I meant to write was that I will have a lot of application scope data, objects that are kept in memory as long as the server is running, shared by multiple servlet instances.

  • SSO between WebDynpro and Servlet on the same machine

    Hi,
    I have an WebDynpro application running in our portal which makes some calls using RFC to a backend system. The RFC connection is obtained using DestinationService and SAP Logon Ticket is used for authentication.
    This app should call a servlet on the same instance which also uses RFC to get some data from the backend.
    Now, wenn I call the servlet from the WebDynpro, the exception java.lang.IllegalStateException: No SAP logon ticket found comes up. Does anyone have an idea how to configure the servlet-webapp to accept logon tickets?
    Thanks in advance
    Thorsten

    this must mean that your windows drive is formatted NTFS. NTFS drives are not natively writable from OS X (only readable). However, you can install Macfuse and [NTFS-3g|http://macntfs-3g.blogspot.com> (both are free) to make them writable.

  • What's the fastest way to edit SD and HD in the same project?

    Hi,
    I'm running the latest version of FCP2 on the latest OS and I have dailies in both SD and HD that need to be cut into the same project. The HDV dailies are 1080p 23.98. We will be finishing in HD but that doesn't concern me because we're finishing this on a Flame. I have worked in SD and I've worked with HDV but always separately, never in the same project. I know that Apple ProRes settings are supposed to allow you to work in both in one project, however, I don't want to have to render every 5 seconds. Does that happen? OR will it allow me to play a cut straight down with no errors with both SD and HD footage in the same sequence?

    I am going to kindly ask that you ignore what David is saying. The information he has given you to this point is incorrect.
    You can capture HDV as SD. The camera or deck you are using will have an option to output the footage as DV. Mind you DV doesn't look as good as HD, and if your intent is an HD master, this would not be the way to go. Capture HDV as HDV...or heck, you can even capture it as ProRes via firewire:
    http://library.creativecow.net/articles/poisson_chris/hdv-prores.php
    Just changing the settings to PRORES doesn't mean that you can now edit everything together. ProREs is a codec, just like DV and HDV. You can have your timeline set up to render HDV AS ProRes, but not sure what that does when you mix in SD on the same timeline.
    Anyway, FCP is perfectly capable of mixing formats without rendering if you are running FCP 6. You will need faster drives for this than the normal firewire 400. And with HDV, you would be wise to use an Intel Mac, as HDV requires a bit of processing power. While I have been able to mix formats with my G5, I get a bright green render bar as opposed to a dark green bar on my MacPro.
    OK, David did give one piece of true advice. You would be better off converting SD to HD before you edit. Or at least after you have locked picture (so you don't have to convert TOO much). Compressor does a really good job, and if you are capturing your HDV as ProRes, then upconverting the SD to ProREs will look fine. SD as HDV...ugh, I don't want to think about that.
    Mind you, ProREs requires raided drives. DV is 3.6MB/s, and ProRes standard is 15MB/s...4 times that of DV. A raided FW800 drive like the G-Raid would be the lowest you could go, but I wouldn't count much on mixing formats with that. either an internal RAID (MacPro) or external eSATA Raid or mini SAS would be better. I like the CalDigit S2VR Duos...and this great desktop drive from MaxxDigital. SOnnet has good models...
    Shane

  • PL/SQL web service--all users share the same database session

    Hi, Is anyone else running into this? If I set a package variable in a pl/sql package through the web service from one client and then connect with another client, I can see the value of the package variable set by the first client. So it appears that instead of being 'stateless', as the documentation claims, that all users are actually connecting to the very same session--and sharing the same memory and variable values.
    When I test my application by myself, I don't run into any problems. But the application I'm working on allows over 1000 students to select dorm rooms concurrently. The timing for that large a group is fine enough that I do have more than one person executing the same section of code simultaneously. This is a serious problem! I'm going to try using pragma serially reuseable on my packages to see if that will take care of it.
    Has anyone else run into this problem? What do you do about it? Is this an issue with the web service? Or the application server?

    Hello!
    I have a question. You seem to be getting somewhere. In the reference (in your post) there is no mention of web.xml Is it a generated file or a file created by you? I am getting IOException error when generating EAR file. What could be wrong? Please help
    TAI
    habeeb

  • Using 2 web services data sources in the same report

    I've been trying unsuccesffuly to use 2 web services data sources in a report. The main report accesses the first web service to get job summary information. 3 fields are are passed as parameters to a sub-report and used as parameters for the sub-report selection. Each report works fine independently, but when I link them together the subreport alway fails to retrieve data.

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • After upgrade from FB4Beta to FB4, web services no longer returning the same data types.

    I just upgraded from FB4 beta to the FB4 release. I'm still running the Flex 3.5 SDK and amnow  unable to use a lot of my web services. In the previous FB4 beta, I could generate the proxy classes from the WSDL and would get a ResultEvent that containted either my complex data type or an ArrayCollection of those complex data types.
    After I deleted and regenerated the services under the FB4 release, I get a ProxyObject or an ArrayCollection of ProxyObjects. No matter what I try I cannot map those ProxyObjects to my complex data type and it's driving me nuts! The oddest thing is that it didn't break all of my services, just some of them.
    I've tried several methods of mapping the ProxyObject to my custom data type but I get a null result every time and no errors.
    private function getContactsResult_handleResult(event:ResultEvent):void
        this._contactsList.removeAll();
        if (event.result is ArrayCollection)
            for each (var contact:ContactType in event.result)
                _contactsList.addItem(contact);                   
        if (event.result is ContactType)
            _contactsList.addItem(event.result as ContactType);
    Any suggestions?

    It looks like this was a combination of the upgrade,
    increasing use of ASP files and not having seperate application
    pools in IIS.
    We've just starting edding aspx apps, previously we only had
    one asp app so we only used the default app;icaton pool in iis.
    With the errors in the virtual directory started, we deleted and
    remade the VD with it's only application pool. That appears to have
    resolved the issues. The only concern I have is one of the VD did
    have it's own applicaton pool and still had the very slow response
    after the upgrade. But I'll see how this solution works for the
    future.
    The decesion was made to only have cf8 installed since that
    worked well on our testing server, so we did intend to overwrite
    the CFIDE folder.
    Thanks for checking this out and for your time on this.
    At this point I consider this closed. If something else comes
    up I'll start a new thread on it.

  • 1. Working with DV and HDV in the same project     2. importing music error

    1. I am working on a project that was shot with both HD and DV footage. What is the best way to work with both types of files on the same time line so that I can compress them to DV format video?
    2. Also, I am having a problem importing music files into Premier. The error message pops up and says that it has an error compiling movie.I am not sure what setting i need to change to get this to work. I am working with MP3 files like I have done with past projects but nothing seems to work. Please help.

    i "I have never worked with with soundbooth but i changed the file type to WAV but had to use IMA ADPCM for the Audio options because I could not save the uncompressed type."
    Ellis,
    How did you "change" the MP3 - what program did you use? You might want to explore Soundbooth, as Aanarav suggests. It works well with PP & Encore.
    [EDIT] I use Audition, but think Soundbooth would be a good choice, as it is bundled in the Production Studio CS3.
    Many folk have problems with MP3 files, for whatever reason. You should be able to convert to PCM WAV from any number of good conversion programs.
    I use a fair number of MP3's in PP and have never had any trouble. Some others have never been so lucky.
    Hunt

  • HostApp and Applet in the same project space?!

    Hello,
    I am using EclipseJCDE for the Applet side and jCardSim for the host application side.
    I wonder if I setup 2 packages, one for each side.
    As you know, I can't include Java SE (jre7) for the Applet.
    When I encompass both applications in one project space, the host application side cannot find certain standard functions
    But when I separate them into 2 project spaces, how do I make them talk?
    Thanks
    Jack
    Edited by: 933351 on 2012/12/29 上午 12:47
    Edited by: 933351 on 2012/12/29 上午 12:48

    Hello,
    I managed to get it work. But how come jCardSim returns a responseADPU with a '?'(-128) at the beginning.
    Can I get rid of that? or is it supposed to be there?
    Thanks
    Jack

  • Can an editor and I work on the same project, at the same time in PPCC?

    I'm trying to figure out if two people can edit a project in live time... I'm currently struggling with the 20gb cloud limit for my projects and I think I'm just going to bring an in house editor into the mix. 
    Can he and I edit the same project from a NAS drive?
    ---Trav

    As far as I know, "regular" Premiere Pro does not have any provision for the kind of file locking/unlocking required for 2 people to edit the same project... so if YOU save an edit and your other person saves after you, your edit is going to be overwritten and lost
    Solution for networks...
    Adobe Anywhere http://www.adobe.com/products/adobeanywhere.html
    http://www.creativeimpatience.com/adobe-anywhere-enterprise-solution/

  • HD 1080i  and  HD 1080p on the same project????

    Hello everyone.
    I am running with Finalcust 6. I need to buy a new camera. I do have the Canon HV30. Can I import in the same project footage with the format HD1080i  and  HD 1080p from different cameras?
    I dont know if I need to buy this camera:
    http://www.bhphotovideo.com/c/product/581316-REG/Sony_HDRFX1000_HDR_FX1000_Handy cam_HDV_Camcorder.html
    Or this:
    http://www.bhphotovideo.com/c/product/518555-REG/Sony_HVRHD1000U_HVR_HD1000U_Dig ital_High_Definition.html
    I am really happy with my HV30 results. And I am afraid to have some problem to work with 2 differents types. And if I can work with 1080i and 1080p in the same project, what will be the results?
    Thanks alot
    Fabricio Giugni

    Avoid mixing them if you can. If you do have both edit in 1080i to maintain the resolution of that media. Anything that's 1080p and needs to be rendered will become interlaced.

  • Web Service Import Error - Can't Create Project Library

    Hello,
    I'm haiving an issue importing a particular .NET web service using the import wizard.  I'm running .NET 2.0 framework and LV8.2.  I have followed this tutorial and successfully got a few simple services working.  I can successfully import an use simple web services like this one with no issues, but when I attempt to import a local web service I keep experienceing the same error at the end of the import, the error is:
    The following errors/warnings occurred when generating the local proxy dll and VI wrappers for this web service.
    Can't Create Project Library.
    Project Library Generation Failed.
    Possible Reasons:
    1) The imported project library has a conflicting name with a project library already in memory.
    2) The imported VIs have conflicting names with VIs already in memory.
    Close the project library and VIs and reimport the Web Service.
    ionService.lvlib
    I seriously doubt that the error is actually caused by 1 or 2, I think this is just the default message for some other error.  I have cleaned all previous failed projects from the userlibs and opened and closed the program, restarted etc...  I have also tried this and got the same error with another machine running .NET 1.1 and LV8.2, same error.
    The service's WSDL page seems to be working correctly, LV sees the availble functions and lists them correctly for import, it just always fails when creating the DLL wrappers.
    I have included the WDSL XML file for reference.
    Anyone have any ideas for fixing this?
    Thanks,
    Adam
    Message Edited by ajckson on 05-20-2008 04:27 PM
    Attachments:
    WSDL - XML.zip ‏2 KB

    Hi Adam,
    Some of the functions in your project library may have the same names as some of the inbuilt functions in LabVIEW or any loaded functions in the memory.
    Try closing down all other programs and see if it works.
    What are the names of the functions you are using?
    You may have to rename them to remove the naming conflict, but you did mention that you don’t think that it’s because of one of those reflected conflicts!!
    SubVIs being generated may have the same name as some LabVIEW inbuilt functions which may be causing the problem.
    Could you please provide the header file to see the names of the functions?
    Hopefully this helps!!
    Aashish M
    Applications Engineer
    National Instruments
    http://www.ni.com/support/

  • Entity Framework - Code First - Migration - How to access SQL Server and Oracle using the same context?

    Hello,
    I use Entity Framework code first approach.
    My project is working fine with SQL Server. But, I want to access Oracle too. I want to switch SQL Server and Oracle in run time.
    I am able to access Oracle using "Oracle.ManagedDataAccess.EntityFramework.dl" in a new project.
    But, Is this possible to access SQL Server and Oracle in the same project.
    Thanks,
    Murugan

    This should be possible with a Code-First workflow.  In Code-First the database mapping layer is generated at runtime.
    David
    David http://blogs.msdn.com/b/dbrowne/

  • How to integrate deployed Web Services and Portlets

    Hi All,
    I am able to deploy Web Services and Portlets in the Application Server, which is in the network system.Now, I want to know how to integrate the Web Services and Portlets.I dont have any idea about this and i didn't got any good material..
    Please, provide some useful links or material, if anybody has any idea about this.
    Thanks in advance.
    Praphul

    You can consume a Web service from a JSF page for example using the ADF Web service data control:
    http://www.oracle.com/technology/obe/obe11jdev/bulldog/webservices/ws.html
    http://www.oracle.com/technology/obe/obe11jdev/11/wsdc/wsdc.htm
    You can turn these JSF pages into portlets using WebCenter's JSF to Portlet bridge.
    http://www.oracle.com/technology/products/jdev/11/cuecards111/jps_set_62/ccset62_ALL.html

Maybe you are looking for