Calling EJB over HTTP from thick client

Hi,
But, if I want to use a thick client then how I can make calls through HTTP.
I know about j2ee client container. But in addition to it, I may have to write some code on client as well on server. Any inputs/guidelines will be helpful for me.
Thanks,
Plad

Hi,
Thanks. I checked weblogic's documentation for application client but could not find what servlet can be configured.
In SUN documentation at http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Overview2.html say that- Application clients directly access enterprise beans running in the business tier. However, if application requirements warrant it, a J2EE application client can open an HTTP connection to establish communication with a servlet running in the Web tier.
Any app. server doc providing details on how servlet needs to be used, what coding is required?How j2ee client container will send HTTP request to server.
Thanks.

Similar Messages

  • 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.

  • Calling EJB 3.0 from ALBPM

    Hi,
    I tried calling EJB 2.1 from ALBPM and it worked.
    But I was nto able to call EJB 3.0.
    Is calling EJB 3.0 supported from ALBPM 6.0.2?
    If yes, how to call a business method in EJB 3.0?

    Frank,
    Thanks. The @LOB annotations are missing.
    Create table with:
    CREATE TABLE TestBlob (id number PRIMARY KEY, xmlCol BLOB);
    INSERT INTO TestBlob VALUES(1, EMPTY_BLOB());
    The following is the complete listing for the EJB 3 class generated from table TestBlob.
    package ejb3;
    import java.io.Serializable;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import javax.persistence.NamedQueries;
    import javax.persistence.NamedQuery;
    @Entity
    @NamedQueries({
    @NamedQuery(name = "Testblob.findAll", query = "select o from Testblob o")
    public class Testblob implements Serializable {
    @Id
    @Column(nullable = false)
    private Long id;
    private byte[] xmlCol;
    public Testblob() {
    public Testblob(Long id) {
    this.id = id;
    public Long getId() {
    return id;
    public void setId(Long id) {
    this.id = id;
    public byte[] getXmlCol() {
    return xmlCol;
    public void setXmlCol(byte[] xmlCol) {
    this.xmlCol = xmlCol;
    }

  • SOAP over HTTPS from XE to 10.1.3

    I'm trying to setup the classic client server application using soap(web services,utl_http) over https between XE(clients) and Application server 10.1.3. I created a pl/sql web service using JDeveloper 10.1.3 and deployed it to the AS successfully.
    When trying to create a new webservice through HTML DB (over port 80), XE states that I have no input or output parameters for my soap methods. I belive its parsing my WSDL wrong...but this is another thread...I think I can make that work.
    The main technolgical problem is sending the soap msgs over https. I would perferr to do this with utl_http since I could control my logic with pure pl/sql. Is the Apache proxy route the only option?
    Is there no way for pl/sql to consume web services?
    If a JVM was included with XE then this would be a breeze(hint hint)
    Thank you
    Dan

    Dan,
    The SOAP utility with APEX appears to be very weak, I and several others have tried to use it against 'real' web services (e.g. Amazon's S3) and get the same problem, no input or output parameters.
    To do SOAP client within Oracle the hard way see ...
    http://www.oracle.com/technology/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html
    I'm using Simon Fell's PocketSoap library with Excel VBA to first ensure my understanding of the S3 service, then I'll use the resulting soap envelopes as templates for hand coding into PL/SQL. Not ideal, but it works.
    Tom

  • Is it possible to call API over http(not on ssl) from inside a secure page which is on HTTPS

    Hi Guys
    We are running a httplistner on localhost exposing http based end point. can we call this url from a website which is exposed over https when it opens from the same machine.
    Note: the site is being opened in browser is using HTTPS and is on SSL.
    if possible can some one please help.
    regards
    Mukesh V

    hjuarez wrote:
    Please re-read my first post. I think it is clear.I disagree.
    I want to import a dll It is not clear if you are aware that .dll files are a windows thing.
    but I have to run the java code on a solaris box
    in order to use its methods in java, It is not clear if you are aware using .dll files in a Solaris environment has nothing to do with Java.
    My question was if there is a solution -or not- that faces this kind of issues.It is not clear if you are talking about Sun Solaris or x86 Solaris.
    I don't know if it makes any difference, but it might.
    Maybe your question is: why this guy wants to do something like this?No. I am not concerned with that.
    Just trying to help you ask the right questions.
    And maybe you will find the answers yourself once you have the right questions.
    I'm integrating some biometric solutions on Sun Access Manager. But the biometrics vendor only provides windows ocx's and DLL's. And Access Manager is running in a Solaris box.
    I want to know if I can do something by myself or just tell the biometrics vendor that they must provide a Java solution.
    I have been trying to find something on the web, but I asked this forum because maybe someone has tried to do something similar.The suggestion by jschell is probably your most promising option.
    Integrating the .dll files with Java on a Windows box
    and communicating between Access Manager / Java on the Solaris box and your Java code on the Windows box
    (possibly using RMI).

  • Calling ejb of wl6 from VAJ

    Can i run inside visual age 3.0 a java application program that calls
    EJB residing
    on a weblogic 6.0 server?
      thanks
        OHAD

    No, there are certain server features that require 1.3 to operate, but
    it's not every weblogic class. JDK 1.2 is supported for clients of 6.0,
    see:
    http://e-docs.bea.com/wls/platforms/index.html#mix
         -- Jim
    OHAD wrote:
    >
    The problem is that the clients needs classes of weblogic server and
    therefore
    also require jdk 1.3. Isn't it correct?
    OHAD
    Jim Edwards-Hewitt wrote:
    Probably. While the server requires JDK 1.3 (which VAJ doesn't have
    yet), clients can run with earlier Java versions.
    -- Jim
    OHAD wrote:
    Can i run inside visual age 3.0 a java application program that calls
    EJB residing
    on a weblogic 6.0 server?
    thanks
    OHAD

  • No video stream when calling 3rd party endpoint from Jabber client

    I use my own H323 client based on the H323Plus open source. It works very well with VCS and all endpoints we tried (a dozen or so from every vendor). We have a problem with Jabber Video though, across all versions from MOVI to 4.4.3. When my own client calls Jabber everything works as it should. However, when Jabber calls my client then (1) it takes up to a minute for Jabber to display incoming video and (2) Jabber does not create outgoing video stream. This behavior is 100%  reproducible across all PCs we tried. Jabber is registered with either VCS Starter Pack or VCS Control, sofwtare version 6.1 in both cases. We do not use provisioning at this time.
    In Jabber logs there is a unclear hint about insufficient resources (bandwidth?) for the video stream. VCS configuration is fine (it works with all other clients like e20) and I do not see anything useful in VCS logs.
    To narrow the discussion, this is NOT a firewall, client camera or driver, OS misconfiguration or any other external issue. It is Jabber video having problem negotiating capabilities and/or resources but only it initiates the call. Where should I look for a solution?

    I was afraid this will end this way. I hoped you might have had such a case solved already :-).
    Audio works fine, no problem at all. The video packets are not sent from my client to Jabber while in the 1 minute wait; the stream from Jabber  is not even started. I still think I need Wireshark to decode H225 traffic. Good idea with the interworking log - I was too lazy to go the OS layer. As you surely know, only 2 of the VCS logs are available from the Web interface.
    thanks for your help!

  • Problem in calling webservice using https from livecycle designer

    I  want to call a webservice written in .net(c#) using https  from livecycle  designer.I can call webservice using http ,but when i try with https it is  failing.If there any special configuration have to do in server for this ?I have  already put crossdomain in server.
    Waiting  for your reply
    thank's

    How did you call from LC? Please help me out either one is fine to me http or https
    Srujan

  • EJB deployment/access from the Client Machine

    I want to deploy/access the EJB on the Oracle 8i server from the
    Client Machine. From the Oracle 8i server machine i am able to
    deploy and access the EJB
    When i am trying to deploy/access the EJB i am getting the
    following message
    javax.naming.CommunicationException: Unknown service : sess_iopp
    url
    Please tell me what to do ?
    Thanks in advance
    null

    Are you using JDeveloper? If yes then go to File|New->Snippets
    and select 'Example JServer EJB Client' to create an EJB client.
    : javax.naming.CommunicationException: Unknown service :
    sess_iopp
    It's sess_iiop not iopp ;-)
    Regards,
    Arun
    Manish Patel (guest) wrote:
    : I want to deploy/access the EJB on the Oracle 8i server from
    the
    : Client Machine. From the Oracle 8i server machine i am able to
    : deploy and access the EJB
    : When i am trying to deploy/access the EJB i am getting the
    : following message
    : javax.naming.CommunicationException: Unknown service :
    sess_iopp
    : url
    : Please tell me what to do ?
    : Thanks in advance
    null

  • Call an Application Module deployed as EJB into JServer from a client

    Hi all,
    I've successfully deployed a BC4J Application Module as EJB Session Bean into Oracle8i 8.1.6.
    The deployment descriptor (file LoginModule.dd) starts with the foolowing lines:
    Session Bean ricercalista.server.ejb.LoginModuleServerEJB
    BeanHomeName = "/test/omero/ejb/ricercalista.LoginModule";
    HomeInterfaceClassName = ricercalista.common.ejb.LoginModuleHome;
    RemoteInterfaceClassName = ricercalista.common.ejb.RemoteLoginModule;
    The client code that calls the EJB is:
    import oracle.jbo.*;
    import java.util.Hashtable;
    import javax.naming.*;
    import oracle.jbo.JboContext;
    import ricercalista.common.*;
    import ricercalista.common.ejb.*;
    import ricercalista.UserProfile;
    public class ProvaEJBLogin {
    public static void main(String[] args) throws Exception {
    final String AMDefName = "ricercalista.LoginModule";
    final String Username = "omero";
    final String Password = "omero";
    final String DBUrl = "jdbc:oracle:thin:omero/omero@localhost:1521:OMERO";
    try {
    Hashtable env = new Hashtable(10);
    env.put(Context.INITIAL_CONTEXT_FACTORY, JboContext.JBO_CONTEXT_FACTORY);
    env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_ORACLE8I);
    env.put(JboContext.HOST_NAME, "bacco08.csr.unibo.it");
    env.put(JboContext.CONNECTION_PORT, "2481");
    env.put(JboContext.ORACLE_SID, "OMERO");
    env.put(JboContext.APPLICATION_PATH, "test/omero/ejb");
    env.put(JboContext.SECURITY_PRINCIPAL, Username);
    env.put(JboContext.SECURITY_CREDENTIALS, Password);
    Context ic = new InitialContext(env);
    LoginModuleHome home = (LoginModuleHome) ic.lookup(AMDefName);
    LoginModule myejb = (LoginModule) home.create();
    myejb.getTransaction().connect(DBUrl, Username, Password);
    myejb.setUser("turronic", "chris");
    System.out.println((String) myejb.getCognome());
    System.out.println((String) myejb.getNome());
    UserProfile up = myejb.getUserProfile();
    for (int i = 0; i < up.size(); i++) {
    System.out.println("dominio = " + up.getCodeDomain(i) + " grado = " + up.getInterestDegree(i));
    myejb.getTransaction().disconnect();
    myejb.remove();
    catch (NamingException ne) {
    System.out.println("Unable to find application " + AMDefName);
    ne.printStackTrace();
    catch (ApplicationModuleCreateException e) {
    System.out.println("Unable to create application module " + AMDefName);
    e.printStackTrace();
    When I run this client, I find the following error:
    "D:\Program Files\Oracle\JDeveloper 3.1.1.2\java1.2\jre\bin\javaw.exe" -classpath "D:\Program Files\Oracle\JDeveloper 3.1.1.2\myclasses;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jbojdbcpatch.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jboorasql.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jbodatum12.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jdev-rt.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\jdbc\lib\oracle8.1.6\classes12.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\connectionmanager.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jbomt.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jboremote.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jndi.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\xmlparserv2.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\javax_ejb.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jboremoteejb.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\aurora_client.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\vbjorb.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\vbjapp.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jbohtml.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jboo8i.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\jswdk-1.0.1\lib\servlet.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\samples\borland\samples\bdk\Test.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\samples\borland\samples\bdk\Jelly.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\samples\borland\samples\bdk\Juggler.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\samples\borland\samples\bdk\Misc.jar;D:\Program Files \Oracle\JDeveloper 3.1.1.2\samples\borland\samples\bdk\Molecule.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\samples\borland\samples\bdk\Buttons.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\classgen.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jboejb.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\aurora_client.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\vbjorb.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\vbjapp.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\javax_ejb.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\vbjtools.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\vbj30ssl.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\aurora.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\sqlj\lib\translator.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jboremote.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jbo8iclient.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\aurora_client.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\vbjorb.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\aurora\lib\vbjapp.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jndi.jar;D:\Program Files\Oracle\JDeveloper 3.1.1.2\lib\jbodatum12.zip;D:\Program Files\Oracle\JDeveloper 3.1.1.2\java1.2\jre\lib\rt.jar" ricercalista.ProvaEJBLogin
    Diagnostics: Silencing all diagnostic output (use -Djbo.debugoutput=console to see it)
    Unable to find application ricercalista.LoginModule
    [Root exception is java.lang.ClassNotFoundException: ricercalista.common.ejb.LoginModuleHomeHelper]javax.naming.NamingException: Unknown reasons
    void oracle.jbo.client.remote.corba.aurora.AuroraApplicationModuleHome.initRemoteHome()
    void oracle.jbo.client.remote.corba.aurora.AuroraApplicationModuleHome.<init>(oracle.jbo.JboContext, java.lang.String)
    oracle.jbo.common.JboHome oracle.jbo.client.remote.corba.aurora.AuroraInitialContext.createJboHome(java.lang.String)
    java.lang.Object oracle.jbo.common.JboInitialContext.lookup(java.lang.String)
    java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
    void ricercalista.ProvaEJBLogin.main(java.lang.String[])
    What's wrong in my code? Are the Context Properties set correctly? The test on this Application Module works fine. So what's the problem?
    I need your help!
    Tnx!
    null

    I've added libraries LoginModuleEJBClient.jar and EJBGenerated.jar to the client project.
    The error isn't the same, but the following:
    Diagnostics: Silencing all diagnostic output (use -Djbo.debugoutput=console to see it)
    Unable to find application ricercalista.LoginModule
    javax.naming.NamingException. Root exception is java.lang.ClassCastException
    void oracle.jbo.client.remote.corba.aurora.AuroraApplicationModuleHome.initRemoteHome()
    void oracle.jbo.client.remote.corba.aurora.AuroraApplicationModuleHome.<init>(oracle.jbo.JboContext, java.lang.String)
    oracle.jbo.common.JboHome oracle.jbo.client.remote.corba.aurora.AuroraInitialContext.createJboHome(java.lang.String)
    java.lang.Object oracle.jbo.common.JboInitialContext.lookup(java.lang.String)
    java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
    void client.LoginClient.<init>()
    void client.LoginClient.main(java.lang.String[])
    Why is there a ClassCastException?
    Tnx in advance for your help.

  • Problem calling ejb in oas from non-oracle java client

    I am trying to call an ejb that is deployed in OAS 9i from a java server page running another non-Oracle app server.
    I continue to get the following error:
    java.lang.ExceptionInInitializerError: org.omg.CORBA.INITIALIZE: can't
    instantiate default ORB implementation com.visigenic.vbroker.orb.ORB minor
    code: 0 completed: No
    I don't think it's a classpath problem. In desperation, I added every jar file in the Oracle directory structure to my classpath.
    The ejb works fine with jsp on OAS, but (at the moment) using OAS as our production web container is not an option.
    Is this even possible?
    null

    Hi Andrei,
    is that all you get? No more nested exceptions? This snippet isn't really explaining thery much...
    Best regards
    Stefan

  • Calling EJB via IIOP from Oracle database

    Hi all,
    I hope someone has a solution for calling an EJB from a Oracle PL/SQL
    procedure.
    We are using IIOP because T3 force weblogic.jar (approx 30MB) to be
    loaded in the database. Unfortunately, Oracle refuse it with many
    errors, and corrupt its own JVM !
    so... IIOP
    When we try that, we get the following error :
    org.omg.CORBA.OBJ_ADAPTER: minor code: 1398079492 completed: No
    at com.sun.corba.se.internal.corba.ORB.connect(ORB.java:1098)
    at com.sun.corba.se.internal.corba.ORB.getServantIOR(ORB.java:1140)
    at com.sun.corba.se.internal.corba.ClientDelegate.getServiceContexts(ClientDelegate.java:254)
    at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:346)
    at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:366)
    at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:198)
    at com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:265)
    at com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:188)
    at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(ORB.java:1461)
    at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:281)
    at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:256)
    at com.sun.jndi.cosnaming.CNCtx.initOrbAndRootContext(CNCtx.java:193)
    at com.sun.jndi.cosnaming.CNCtx.<init>(CNCtx.java:73)
    at com.sun.jndi.cosnaming.CNCtxFactory.getInitialContext(CNCtxFactory.java:35)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:665)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:293)
    at javax.naming.InitialContext.init(InitialContext.java:269)
    at javax.naming.InitialContext.<init>(InitialContext.java:245)
    at ch.xxx.ConnectEJB.getInitialContext(ConnectEJB.java:99)
    The environments are Oracle 9.2 and WLS 7.0, Client and Server use JDK
    1.3.1
    The same test client is running without any error from a jvm outside
    Oracle.
    Thanks in advance for your help.
    Chris.

    [email protected] (ChrisFR) writes:
    Sounds like a question for Oracle.
    andy
    Hi all,
    I hope someone has a solution for calling an EJB from a Oracle PL/SQL
    procedure.
    We are using IIOP because T3 force weblogic.jar (approx 30MB) to be
    loaded in the database. Unfortunately, Oracle refuse it with many
    errors, and corrupt its own JVM !
    so... IIOP
    When we try that, we get the following error :
    org.omg.CORBA.OBJ_ADAPTER: minor code: 1398079492 completed: No
    at com.sun.corba.se.internal.corba.ORB.connect(ORB.java:1098)
    at com.sun.corba.se.internal.corba.ORB.getServantIOR(ORB.java:1140)
    at com.sun.corba.se.internal.corba.ClientDelegate.getServiceContexts(ClientDelegate.java:254)
    at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:346)
    at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:366)
    at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:198)
    at com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:265)
    at com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:188)
    at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(ORB.java:1461)
    at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:281)
    at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:256)
    at com.sun.jndi.cosnaming.CNCtx.initOrbAndRootContext(CNCtx.java:193)
    at com.sun.jndi.cosnaming.CNCtx.<init>(CNCtx.java:73)
    at com.sun.jndi.cosnaming.CNCtxFactory.getInitialContext(CNCtxFactory.java:35)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:665)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:293)
    at javax.naming.InitialContext.init(InitialContext.java:269)
    at javax.naming.InitialContext.<init>(InitialContext.java:245)
    at ch.xxx.ConnectEJB.getInitialContext(ConnectEJB.java:99)
    The environments are Oracle 9.2 and WLS 7.0, Client and Server use JDK
    1.3.1
    The same test client is running without any error from a jvm outside
    Oracle.
    Thanks in advance for your help.
    Chris.--
    " .sigs are like your face - rarely seen by you and uglier than you think"
    mail: [email protected]

  • Getting error while calling ejb business methods from servlet

    Hi
    Iam getting error when i try to call a ejb method from servlet.Error is
    "com.netscape.server.eb.UncheckedException: unchecked exception nested exception is:java.lang.NullPointerException".
    I build the application and deployed it successfully.Iam using IAS 6.O with windows NT 4.0.
    This is just a method which takes values from database and return as an array of bean to servlet.
    Any help on this.Thanks Shank

    Hi
    I was using the session bean.Your suggestion helped me a lot.Perfect.
    I debug my program and found that from ejbCreate()exception is getting.
    I was getting the datasource object thro ejb create() initialisation.
    Somehow the look up jndi which i mentioned was not interpretting from ejb-jar.xml ias-ejb-jar.xml and datasource ref .Due to this iam getting jndi Namenotfound exception which in turns to null pointer as datasource is getting null.
    when i hardcoded in the ejb the the jndi name for datasource it is working fine.Bit worried all the existing ejbs working with the xml referenced datasource and jndi,but when i added a new ejb with same properties it is failing to get the jndi name.
    Piece of code from ias-ejb-jar.xml
    <resource-ref>
              <res-ref-name>myDataSource</res-ref-name>
              <jndi-name>jdbc/nb/myData</jndi-name>
    </resource-ref>
    Piece of code from ejb-jar.xml
    <resource-ref>
              <res-ref-name>myDataSource</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
    </resource-ref>
    Thanks a lot meka

  • Calling .asmx Web Service from Java Client

    hi
    I have created one java client in WSAD 5.1 to invoke .asmx web service. I have used the following code for it.
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import org.apache.axis.encoding.XMLType;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.NamespaceConstants;
    import javax.xml.rpc.ParameterMode;
    import java.net.URL;
    public class JavaWS3
         public static void main(String [] args)
              try
                   // Responds the same with or without the ?WSDL
                   String     strEndPoint          = "http://www.meizlik.com/Service.asmx";
                   String     strSoapAction     = "http://www.meizlik.com/BigAdd";
                   String     strSchemaURL     = "http://www.w3.org/2001/XMLSchema";
                   String     strParamName1     = "addend_1";
                   String     strParamName2     = "addend_2";
                   String     strParameterVal1= "10";
                   String     strParameterVal2= "7";
                   String     strFunctionName     = "BigAdd";
                   //Call     call   = (Call) new Service().createCall();//Works
                   //Call     call   = new Call(strSoapAction);//Works same
                   //Call     call   = new Call(strEndPoint);//Works same
                   Service  service = new Service();
                    Call call= (Call) service.createCall();
                   call.setEncodingStyle(NamespaceConstants.NSURI_SOAP_ENCODING);
                   call.setTargetEndpointAddress(new URL(strEndPoint));
                   // first parameter in QName seemingly takes ANYTHING
                   call.setOperationName(new QName("http://www.meizlik.com", strFunctionName));
                   // Set the name of the parameter and the return type
                   call.setReturnType(XMLType.XSD_STRING);
                   call.addParameter(new QName("http://www.meizlik.com",strParamName1), XMLType.XSD_STRING, ParameterMode.IN);
                   call.addParameter(new QName("http://www.meizlik.com",strParamName2), XMLType.XSD_STRING, ParameterMode.IN);
                   // Catch the result and print it
                   // Parameter count is now ONE (1).
                   // call.setUseSOAPAction(true);//Not Necessary
                   call.setSOAPActionURI(strSoapAction);//Yes Necessary
                   String     strResult = (String) call.invoke(
                        new Object[] {
                             new String(strParameterVal1),
                             new String(strParameterVal2)
                   System.out.println("Result='" + strResult + "'");
              catch (Exception e)
                   e.printStackTrace();
                   System.out.println(e.toString());
    }this code is giving me the exception as :
    java.net.ConnectException: Operation timed out: connect due to invalid addressI visited web service URL http://www.meizlik.com/Service.asmx and its working fine.
    I also tried Java Proxy method in WSAD 5.1 but it is showing me the same error.
    Where am I wrong? Can anyone plz give me solution 4 this.
    Thanks..

    Hi,
    I have even generated folowing code with SoaMoa, it is perfect. Please try SoaMoa it is a useful tool.
    The generated code of SoaMoa :
    /* Generated Testcase by SoaMoa, :ridvan at Thu Jun 04 21:53:14 CEST 2009 */
    import java.util.Map;
    import javax.xml.namespace.QName;
    import javax.xml.soap.MessageFactory;
    import javax.xml.soap.SOAPBody;
    import javax.xml.soap.SOAPConstants;
    import javax.xml.soap.SOAPElement;
    import javax.xml.soap.SOAPEnvelope;
    import javax.xml.soap.SOAPMessage;
    import javax.xml.soap.SOAPPart;
    import javax.xml.ws.Dispatch;
    import javax.xml.ws.Service;
    import javax.xml.ws.BindingProvider;
    import javax.xml.ws.soap.SOAPBinding;
    import java.util.Iterator;
    import junit.framework.TestCase;
    public class BigAddTest extends TestCase {
    public void testBigAdd() throws Exception {
    String endpointURL = "http://www.meizlik.com/Service.asmx";
    QName serviceName = new QName("http://www.meizlik.com", "Bob_Services");
    QName portName = new QName("http://www.meizlik.com", "Bob_ServicesHttpPost");
    Service service = Service.create(serviceName);
    service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, endpointURL);
    Dispatch<SOAPMessage> dispatch = service.createDispatch(portName, SOAPMessage.class, Service.Mode.MESSAGE);
    BindingProvider bindingProvider = (BindingProvider) dispatch;
    // Optionally Configure RequestContext to send SOAPAction HTTP
    Map<String, Object> rc = bindingProvider.getRequestContext();
    rc.put(BindingProvider.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
    rc.put(BindingProvider.SOAPACTION_URI_PROPERTY, "http://www.meizlik.com/BigAdd");
    MessageFactory messagefactory = MessageFactory.newInstance(SOAPConstants.SOAP_1_1_PROTOCOL);
    SOAPMessage request = messagefactory.createMessage();
    SOAPPart part = request.getSOAPPart();
    SOAPEnvelope env = part.getEnvelope();
    SOAPBody body = env.getBody();
    body.addNamespaceDeclaration("www", "http://www.meizlik.com");
    SOAPElement BigAdd = body.addChildElement("BigAdd", "www");
    SOAPElement addend_1 = BigAdd.addChildElement("addend_1", "www");
    addend_1.addTextNode("11");
    SOAPElement addend_2 = BigAdd.addChildElement("addend_2", "www");
    addend_2.addTextNode("11");
    request.saveChanges();
    SOAPMessage response = dispatch.invoke(request);
    SOAPBody replyBody = response.getSOAPBody();
    SOAPElement BigAddResponse = (SOAPElement) replyBody.getChildElements(new QName("http://www.meizlik.com", "BigAddResponse")).next();
    assertNotNull( "BigAddResponse is null", BigAddResponse);
    SOAPElement BigAddResult = (SOAPElement) BigAddResponse.getChildElements(new QName("http://www.meizlik.com", "BigAddResult")).next();
    assertNotNull( "BigAddResult is null", BigAddResult);
    assertEquals("BigAddResult", "0000000000000000000000000022", BigAddResult.getTextContent());
    }

  • GlassFish v3, EJB 3.1 and Standalone Client

    hi team.
    I'm very glad releasing javaee 6.
    I download netbeans 6.8 with GlassFish v3 and try to write simple ejb 3.1 application.
    ejb module deployed successfully without any problem, after this I've created new simple java application and try to call ejb 3.1 session bean.
    but no success.
    can anybody show me sample code how to call ejb 3.1 from standalone client ??
    I was working with ejb 3.0 and jboss. I had not any problem from standalone client.
    ejb 3.0 standalone client for jboss:
    Properties env = new Properties();
    env.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
    env.setProperty("java.naming.provider.url", "localhost:1099");
    env.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming");
    InitialContext ctx = new InitialContext(env);
    SomeSessionInt sBean = (SomeSessionInt)ctx.lookup("SomeSessionBean/remote");can anybody tell me which client jars are required for client application and what is the environment properties should i set ?
    PS.
    Also i tried to make enterprise application with ejb and web module into netbeans. but there wasn't any problem to inject ejb session bean from jsf managed bean. problem is how to lookup ejb from standalone client.
    any ideas will be appreciated.
    Regards,
    Paata Lominadze.

    also i can post my full example with error stacktrace.
    1.session bean (interface not required , as we know from spec.)
    public class MySessBean {
        public String sayHello(String name) throws Exception {
            System.out.println("Method initialized.");
            return "Hello : " + name;
    }2.Standalone java client
    public class Main {
        public static void main(String[] args) {
            try {
                Properties jndiProps = new Properties();
                jndiProps.put("java.naming.factory.initial", "com.sun.enterprise.naming.impl.SerialInitContextFactory");
                jndiProps.put("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
                jndiProps.put("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
                jndiProps.setProperty("org.omg.CORBA.ORBInitialHost", "127.0.0.1");
                jndiProps.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
                Context ctx = new InitialContext(jndiProps);
                System.out.println(ctx.lookup("java:global/MyEJBModule/MySessionBean"));
                MySessionBean mySessionBean = (MySessionBean)ctx.lookup("java:global/MyEJBModule/MySessionBean");
                mySessionBean.sayHello("Paata");
            } catch (Exception e) {
                e.printStackTrace();
    }3. error stacktrace on server side:
    WARNING: "IOP00100006: (BAD_PARAM) Class com.magti.billing.ejb.__EJB31_Generated__MySessionBean__Intf____Bean__ is not Serializable"
    org.omg.CORBA.BAD_PARAM:   vmcid: OMG  minor code: 6 completed: Maybe
            at com.sun.corba.ee.impl.logging.OMGSystemException.notSerializable(OMGSystemException.java:990)4.client side error stacktrace:
    Dec 14, 2009 9:15:13 AM com.sun.enterprise.transaction.JavaEETransactionManagerSimplified initDelegates
    INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
    Dec 14, 2009 9:15:18 AM com.sun.enterprise.naming.impl.SerialContext lookup
    SEVERE: enterprise_naming.serialctx_communication_exception
    Dec 14, 2009 9:15:18 AM com.sun.enterprise.naming.impl.SerialContext lookup
    SEVERE:
    java.rmi.MarshalException: CORBA BAD_PARAM 1330446342 Maybe; nested exception is:
            java.io.NotSerializableException: ----------BEGIN server-side stack trace----------
    org.omg.CORBA.BAD_PARAM:   vmcid: OMG  minor code: 6 completed: Maybe
            at com.sun.corba.ee.impl.logging.OMGSystemException.notSerializable(OMGSystemException.java:990)
            at com.sun.corba.ee.impl.logging.OMGSystemException.notSerializable(OMGSystemException.java:1005)
            at com.sun.corba.ee.impl.orbutil.ORBUtility.throwNotSerializableForCorba(ORBUtility.java:753)
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAny(Util.java:370)_____________________________
    Regards,
    Paata Lominadze.

Maybe you are looking for