Need advice about web services and Java beans

Hi
I am very new to web services and to Java beans as well.
I am trying to understand if and how a web service can use functionality I have in a Java bean. I couldn't find any documentation I can use.
For example:
InitialContext ic = new InitialContext();
Adder adder = (Adder) ic.lookup("ejb/AdderJNDI");In a EJB client project (I'm working with Eclipse) if I add the EJB project to the build path, the Adder interface is recognized.
Theoritacally I thought I can do the same in a web service server project, but the Adder interface is not recognized.
Is there something I can read to understand how I need to use the EJB or implement the web service?
Many thanks
Sigal

Okay....I think I made some errors with the original scenario:
It basically comes down to this....I think. OCS Calendar has a set of Java classes and methods that provide an abstraction for their web services interface. I know how to create something to use these classes using an IDE like JDeveloper, but I'm not sure how that would work with HTML DB.
I've noticed that the SQL Workshop has a place for Java sources and classes, and I've heard mentions of PL/SQL wrapping. Is there a way to import classes into an HTML DB workspace, wrap 'em up, and access them via PL/SQL?
Thanks again,
Jonathan

Similar Messages

  • Create a web service from java bean and map exceptions to SOAP faults

    Hi,
    We have to expose our Session stateless EJB3 as web services. I've tried to use annotations and jdev wizard "java bean to web service" and it works fine.
    Our problem now is that our methods can throw a business exception that contains a list of error message strings to be presented on the client.
    I did not find any way to use annotations to make it build a wsdl with soap fault mapped to our exception class. Neither I could to make the wizard to create wsdl with faults.
    As we are exposing already designed and implemented classes as web services, I think the bottom-top (java->wsdl) approach is better that top->botton (wsdl->java). Therefore, I'm looking for a possibility to generate the web services from the java beans and have the exception be mapped to a soap fault message.
    We are using jdev 10.1.3.1 and OAS 10.1.3.1., is there a way to map exceptions to soap faults using bottom->top approach?
    thank you

    A couple of links that may be of help:
    http://www.netbeans.org/servlets/ReadMsg?listName=nbj2ee&msgNo=1218
    My last question concerning web services:
    I have already written a session bean and I'd like to add some methods
    as a web service to it, how do I do that?
    Or I can only create another bean for a webservice and cannot modify the
    original one?You might create web service with existing sources and select you bean. New web services with appropriate lookup method will be generated.
    All web service method, that will be exposed in web service, you
    should add itself (Pop-up menu Web Service -> Add operation)
    http://usersguide.netbeans.org/files/documents/40/73/Chapter9-WebServices.pdf

  • JAX-WS web service returning java bean

    how can i create a webservice that returns a javabean?
      @WebMethod   
    public Person query(@WebParam(name = "id") String id) {
        Person person=new Person();
        person.setId(id);
        person.setFirstName("Lisa");
        person.setLastName("Cruz");
        return person;
    }will JAX-WS generate the WSDL and XSD Schema file? do i need to edit or create a Schema file or is there something i need to set in my project.
    btw, my IDE is NETBEANS5.5 and my application server is Sun Java System Application Server Platform edition 9.0.
    please help me with this, i'm really new to this technology.
    thanks in advance.

    I got the Same problem and only today i tried web services
    Is it right to do this way.
    If so Please See the thng i've done.
    Otherwise Please Suggest alternatives
    I created Two Projects
    1. Web Service
    2. Web Client.
    A Bean (It is in Web service Project)
    public class Results
    private int sum;
    private int difference;
    private int multi;
    private float division;
    /** Creates a new instance of Results */
    public Results ()
    public Results (int sum,int difference,int multi,float division)
    this.difference=difference;this.division=division;
    this.multi=multi;
    this.sum=sum;
    A Service Method
    public class myService
    // It works Fine in the client
    @WebMethod
    public int addTwoNumbers (@WebParam(name = "var1") int var1, @WebParam(name = "var2") int var2)
    // TODO implement operation
    return var1+var2;
    // How do Get this Stuff Work at the Client
         @WebMethod
    public Results getResults (@WebParam(name = "var1") int var1, @WebParam(name = "var2") int var2)
    Results aResult=new Results((var1+var2),(var1-var2),(var1*var2),(var1/var2));
    return aResult;
    Now, How do I get this working in the Client.
    In the Ide Get get Error (Using Netbeans5.5 -Tomcat).

  • Web Service and Java

    Hi everybody!
    A simple question from a beginner
    I would like to use the query_view_data Web Service provided by SAP.
    Do I basically need a J2EE installation for that?
    I tried to test it in WSADMIN and the wsnavigator-service obviously needs Java.
    Best regards,
    Philipp

    I have found that the older Axis 1.x has some issues talking to anything .NET. My first suggestion would be to go to the latest, which I believe is Axis 2.0. I have some clients that consume my webservices with .NET, and I remember I had to change the messaging type to get it to work...big pain in the rear.

  • Questions about web services and BPEL in ALBPM

    Hi all,
    We are currently evaluating various BPM products in order to decide which one to use. Currently I am evaluating ALBPM Studio 5.7 and I am running my processes on the embedded engine provided with the studio. I have some questions:
    1. We want to be able to use complex types for the web services that are generated for processes. Will this limitation be solved any time in the future?
    2. We want to be able to use the generated web services directly (that is, without calling the startSession method first). Is that possible?
    3. I could not find extensive documentation about developing BPEL processes. There is only one small chapter in the developer documentation about BPEL processes. Is there any more documentation or sample about how BPEL is used in ALBPM?
    4. I have developed a very simple BPEL process, but when I try to deploy it, I get the error "Activity BPEL receive does not have any incoming transitions". How can I resolve this issue? I guess it may be a problem about my PartnerLink definition.
    5. When I try to catalog a wsdl which imports another wsdl (and when the imported wsdl also imports some xsds from another namespace), I get an error which says that a web service xxx with namespace yyy is not found, but actually the thing named xxx is not a web service but a soap fault. What could be the problem?
    6. Is it possible to write a BP method in PBL for a BPEL activity?
    Thanks in advance and best regards..

    look for anwsers in the other newsgroup posting:
    http://forums.bea.com/bea/message.jspa?messageID=600047258
    MAriano
    Benitez/BEA/BPM/Beautiful

  • Question about web service and timeouts

    I have a form with a button script that invokes a synchronous soap web service request to an address validation service. It works nicely in testing but I am a bit concerned at what might happen when we go live with respect to the form hanging if the soap server is unavailable or the user is offline.
    From some simple tests in production, where the web service is available yet:
         - in Windows, it times out in Adobe Reader 10.1.1 within about 15 seconds; and
         - In the Mac, with Adobe Reader 10.1.3 it takes around 4 1/2 minutes.
    The latter is not good, as it hangs Reader the entire time.
    Is there some way I can set a timeout in the soap request. Would it be worth considering an async call? If I changed it to async, could I let the user continue to fill the form and then setFocus with an async flag?

    Hi,
    I'm almost there. I dont think that you can do exception handling in FormCalc. How do I trap the error. So far I have
    if (HasValue(Get("http://despaiqo001.development.local:4001/crossdomain.xml")) == 0) then
         $xfa.host.messageBox("not available")
    else
        $xfa.host.messageBox("got it")
    endif
    but when I change the URL so it cant access it, I get a form calc exception. Any samples of how I can script it?

  • Web services and entity beans

    Hi,
    I want to implement a web service which stores some information.
    I decided to bulid it using ejb.
    Can i expose a web service as an entity bean?
    If so,can anybody introduce me some example?
    If not,what is the solution?

    Yes, u can do that by creating EJB controls first and then add that EJB control to WebService.
    Which Editor is using . if u r using Weblogic Workshop 8.1
    Creat project and then just right click and create EJB Control for that and then add this to web Service
    If u wanna any other information reply ..

  • Web service and java Axis

    Hi everybody
    I'm trying to query a web service like that on http://www.webservicex.net/stockquote.asmx
    and I'm using axis-1_4 API but without success!
    I wrote a class with this code:
         Call call = (Call)service.createCall();
         call.setTargetEndpointAddress(new URL("http://www.webservicex.net/stockquote.asmx"));
         call.setUseSOAPAction(true);
         call.setSOAPActionURI("http://www.webserviceX.NET");
         call.setOperationName( "GetQuote");
         String ret = (String)call.invoke(new Object[]{ "FORD" });
         System.out.println("output returned: " + ret);
    The response is:
    RemoteException System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: http://www.webserviceX.NET.
    at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
    at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
    at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
    faultSubcode:
    faultString: System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: http://www.webserviceX.NET.
    at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
    at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
    at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
    Have I forget to set some other property to the object Call or other reason?
    If anybody have had the some problem can help me?
    Thanks in advance
    Gianni

    I have found that the older Axis 1.x has some issues talking to anything .NET. My first suggestion would be to go to the latest, which I believe is Axis 2.0. I have some clients that consume my webservices with .NET, and I remember I had to change the messaging type to get it to work...big pain in the rear.

  • Need advice about H.264 and Apple ProRes 422.

    When exporting a "master file" I can encode the video as H.264 or Apple ProRes 422 (etc). The H.264 is more compressed but still in 1080p? Does this mean that I do not have to compress the file with "Compressor"? What is the advantage of using ProRes and what is the advantage of using H.264? I want of course the files to be as small as possible but still at the best quality. Any advice?
    Thanks.

    ProRes is an editing format. If you are archiving a finished project, you can create an extremely high quality "print" with H.264. ProRes 422 will use approximately three times as much memory. ProRes 422(HQ) roughly four times and ProRes 4444 up to 10 times (compared to the size of the file FCPX will export as H.264). 
    FCPX exports (shares) H.264 in highest quality (over 45Mbits/sec [if needed] for 1080p), you have no options to adjust for smaller files (or lesser quality from FCPX.)
    To get "as small as possible," you'll need to learn more about compressing video. As a comparison (to FCPX), YouTube limits a maximum bandwidth of 8Mbps (used to be 5Mbps -- I *still* compress to 5Mbps before uploading.) Even compressed this highly, H.264 provides excellent results. [Compressing in ProRes is going from 4444 down to 422 Proxy (not to be confused with proxy media used in FCPX which is 1/4 resolution, i.e. 960x540 for 1080, ProRes 422.) You cannot compress each of the different ProRes flavors individually.]
    You'll need other software to compress further than FCPX.  I use Quicktime 7 Pro. Compressor is another way to go (Compressor will let you set "compression markers" so you can vary the bitrates through various sections of your work).  The way to figure out your compression level is to find a section (less than a minute) with the highest motion high contrast (and/or changing gradients) and export at different bitrates. Watch for "jpeg artifacts" (blocking) and once you've gotten past that, that's the bitrate you should compress to. (I've had some clips that required at least 20Mbps.) It just takes a little practice to get a feel for it.

  • Web Service and Java Classes

    Hello,
    I have list of java classes. I have one java class which calls only the required functions from the list of java classes. When I try to create a VI on that java class I see all the functions needed but all of them are grayed.
    Can anybody please help?
    Best regards,
    Dharmi

    Has anyone else solved this problem? We too are experiencing the same problem.
    We are trying to build a .JWS file from within an ANT build script. The build script compiles the site into a single EAR file that should contain a deployable and usable JWS component, however it obviously does not.
    If anyone has a solution, please let us know. We're facing a code freeze on this project by this Friday and really need some help.

  • Need advice about text formatting and hyperlinking

    Hi folks,
    Thanks for reading my post. I am new at this and am using
    Dreamweaver 6.0 for our website. We are putting together a
    substantial directory on our site and were wondering if there was
    any way for us to:
    1. Not have to enter each hyperlink address into deamweaver
    and have the software automatically recognize the link and point to
    the site; and
    2. Find the most efficient way to highlight a string of text
    quickly
    here is an example of one of our many listings in the
    directory:
    Alleghany County Community Foundation
    4601 Six Forks Road
    Suite 524
    Raleigh, NC 27609
    800-201-9533
    http://www.nccommunityfoundation.org/
    Every foundation has their own grant awarding guidelines.
    Please get in touch with The Alleghany County Community Foundation
    to see if you or your business is eligible for a grant.
    Any advice would be greatly appreciated. Thanks all.
    Vivek

    > Dreamweaver 6.0
    Please run as fast as you can to the Adobe downloads page and
    get the
    updater for DW6.0 -> DW6.1. There were quite a few
    anomalies that can catch
    up with you unexpectedly in that first release version.
    > 1. Not have to enter each hyperlink address into
    deamweaver and have the
    > software automatically recognize the link and point to
    the site; and
    > 2. Find the most efficient way to highlight a string of
    text quickly
    I'm not quite sure what you are asking here. As already
    suggested, it
    sounds like you need to have your link information in a
    database, which is
    then placed on the page but maybe not.
    And 'highlight' a string of text quickly? Sorry - I don't
    understand what
    you are looking for....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "vlakhiani" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hi folks,
    >
    > Thanks for reading my post. I am new at this and am
    using Dreamweaver 6.0
    > for
    > our website. We are putting together a substantial
    directory on our site
    > and
    > were wondering if there was any way for us to:
    >
    > 1. Not have to enter each hyperlink address into
    deamweaver and have the
    > software automatically recognize the link and point to
    the site; and
    > 2. Find the most efficient way to highlight a string of
    text quickly
    >
    > here is an example of one of our many listings in the
    directory:
    >
    > Alleghany County Community Foundation
    > 4601 Six Forks Road
    > Suite 524
    > Raleigh, NC 27609
    > 800-201-9533
    >
    http://www.nccommunityfoundation.org/
    > Every foundation has their own grant awarding
    guidelines. Please get in
    > touch
    > with The Alleghany County Community Foundation to see if
    you or your
    > business
    > is eligible for a grant.
    >
    > Any advice would be greatly appreciated. Thanks all.
    >
    > Vivek
    >
    >

  • Need advice about Mac Pro and Windows networking

    I currently have 2 machines at work: One HP Windows PC (high configuration) and a PowerMac G5 2GHz dual. I'm basically close to purchasing a new Mac Pro to replace both machines but need some advice. I do the majority of design work on the Mac. However I need the Windows PC to also do some design work but mainly use it to connect into the windows network at work. Basically I need to be able to access the network drives (which are set up with Novell Netware, with IPX turned off), Novell GroupWise email system and connect to the internet through the LAN. Can I do this with a Mac Pro, with either Bootcamp or Parallels? Is there any sacrifice in terms of performance in using Bootcamp or Parallels? The end result I want is similar to what I am doing at the moment - at the moment I use a PC to network and the Mac to design, side by side with each other. What I want is to do this from one machine, not two. (I also need the PC side of things as I need to use some software that isn't available on the Mac, eg. bespoke databases that run on PC). Is it easy to network under Bootcamp/Parallels? What pitfalls are there that I need to be aware of?

    When your running Windows via bootcamp, you are essentially Running windows on a PC architecture. You will have all the same capabilities that you have now.
    When you use Parallels to run Windows, you are running Windows as a virtual machine running within the confines of the Mac OS. The advantage is that you can run multiple OS's at the same time, and easily share files and data between them. The disadvantage is that the OS running within Parallels has a slightly performance hit, meaning you are not running as fast as the bootcamp version, but the performance hit is very slight. The only place that Parallels is lacking at the moment is in support of 3D or accelerated graphics. That is Parallels currently cannot make use of a graphics card 3D capabilities or advance GPU options. Parallels has stated their intent is to provide better graphic card support in the near future.
    With all this in mind, I don;t see any reason why you cannot use Parallels for your Windows networking needs, and the Mac for your design needs, all at the same time. You will need of course to ensure you have enough RAM to support both OS's if you intend to run them at the same time.
    Tom N.

  • Quick questions on the topic of Web Services and EJB POJOs

    I have been reading about Web Services and the data types that are aloud as operation parameters and return types. I was wondering what the standard practice for return types; is it to use the Entity classes straight and customize the WSDL instead of letting the EE container do it (avoid cyclic problems in the schema that can occur when using entity 1-to-many and many-to-1 mappings) or; is it to off load the data into a DTO/VO/Bean and let the EE container take care of all the schema mapping for the WSDL? I look at the EE tutorial and bought a EE book both use very basic examples that do not include connecting to a database or using EJB3 for the data store.
    Thanks for any information

    bump

  • What is web services in Java?

    i have searched Google with the word of "web services".I could only find out some general information about web services but not specific.
    Could you please explain me briefly?

    makpandian wrote:
    It describes about web services in common .I want to know what web service is in java platform..
    Thanking You.That is a slightly odd question.
    There's nothing special about web services in Java against web services in any other language...there are, after all, several web service frameworks in Java, so it's not as if there's even a single answer to it.
    Do you understand what a web service is and the associated standards around one? If you do then you should realise that your question doesn't make much sense...unless you're actually asking what ws packages there are around.

  • Web service and web dynpro

    Hi,
    I am learning about web services in java web dynpro. I follow some tutorial on how to create a web service in a java web dynpro using netweaver developer studio. The tutorial works (I think) because in the picture of my local development, I can see the web dynpro component and the model representing the web service. In the web dynpro explorer view I can see the model has been created and the method/service that can be called. But now I don't know how to go on calling these services by the web dynpro methods; can anybody please explain me or post me a link with a tutorial for this (that I did not find). Thanks in advance
    Gabriele

    Hi
      Please go throught links
          https://www.sdn.sap.com/irj/scn/wiki?path=/display/wdjava/faq%252b-%252bmodels%252b-%252badaptive%252bweb%252bservice
          https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d076c662-8c0f-2b10-8ca4-e63c26e2e489
    Import Adaptive Web service Model
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/900bbf94-a7a8-2910-e298-a651b4706c1e
      hope will help you .
    murali

Maybe you are looking for