<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 11/24/2010 05:57 PM, Valter Henrique wrote:
    <blockquote
      cite="mid:AANLkTin9nwc2kAKui9Ej16VpM1kJWBrYjvY=Qq5Gr9mM@mail.gmail.com"
      type="cite">IT WORKS!<br>
    </blockquote>
    <br>
    Great. What did you change?<br>
    <br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Tom<br>
    <br>
    <blockquote
      cite="mid:AANLkTin9nwc2kAKui9Ej16VpM1kJWBrYjvY=Qq5Gr9mM@mail.gmail.com"
      type="cite"><br>
      Thank you so much guys!<br>
      <br>
      <br clear="all">
      <span style="color: rgb(153, 153, 153);">Atenciosamente, </span><br>
      <font size="4">Valter Henrique.</font><br>
      <span style="color: rgb(153, 153, 153);">Ci&ecirc;ncia da Computa&ccedil;&atilde;o</span><br
        style="color: rgb(153, 153, 153);">
      <span style="color: rgb(153, 153, 153);">UFSCar Sorocaba</span><br
        style="color: rgb(153, 153, 153);">
      <span style="color: rgb(153, 153, 153);">(15)9122-1822</span><br
        style="color: rgb(153, 153, 153);">
      <span style="color: rgb(153, 153, 153);">(16)9187-7706</span><br
        style="color: rgb(204, 204, 204);">
      <br>
      <span style="color: rgb(192, 192, 192);">Quem sou:</span><br
        style="color: rgb(192, 192, 192);">
      <a moz-do-not-send="true" style="color: rgb(192, 192, 192);"
        href="http://flavors.me/valterhenrique#_" target="_blank">http://flavors.me/valterhenrique</a><br
        style="color: rgb(192, 192, 192);">
      <a moz-do-not-send="true" style="color: rgb(192, 192, 192);"
        href="http://valterhenrique.mp/" target="_blank">http://valterhenrique.mp/</a>
      <br>
      <br>
      <br>
      <div class="gmail_quote">2010/11/24 Thomas Lockhart <span
          dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:lockhart@fourpalms.org">lockhart@fourpalms.org</a>&gt;</span><br>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <div bgcolor="#ffffff" text="#000000"> There are explicit
            examples in C++ in the omniORB source tree. If you mirror
            that code in Java you should have some success.<br>
            <br>
            But as something is failing in your Java code you should
            debug that. I'll suggest that you confirm that you can
            retrieve valid NameComponent pieces from the naming service
            for each level of the name you have registered and are
            trying to retrieve. And unnest the call to resolve() so you
            can see what the result of that is. But first, you could use
            a naming service listing utility to examine how the naming
            service is being used by your server.<br>
            <br>
            If you are new to CORBA, you will find it very useful to
            have a reference book and tutorial. I have found that, no
            matter which language you are using, the Advanced CORBA
            Programming with C++ by Henning and Vinoski is the book
            worth having.<br>
            <br>
            Oh, you *are* using JacORB, right? The ORB shipped with Java
            is deficient (or at least used to be and I haven't heard
            that it has gotten better).<br>
            <br>
            hth<br>
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Tom<br>
            <br>
            <blockquote type="cite">
              <div>
                <div class="h5">i'm trying, but i don't know where is my
                  mistake here is my client in Java:<br>
                  <br>
                  EchoClient.java<br>
                  ----------------------<br>
                  import org.omg.CosNaming.*;<br>
                  import org.omg.CORBA.*;<br>
                  <br>
                  public class EchoClient {<br>
                  &nbsp;&nbsp;&nbsp; <br>
                  &nbsp;&nbsp;&nbsp; public static void main(String args[]) {<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; try {<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; String SetInfo, ReturnInfo, ref;<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; org.omg.CORBA.Object objRef;<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Echo EchoRef;<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ORB orb = ORB.init(args, null);<br>
                  <br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; objRef =
                  orb.resolve_initial_references("NameService");<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; NamingContext ncRef =
                  NamingContextHelper.narrow(objRef);<br>
                  <br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // locate the service<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; NameComponent nc =&nbsp; new
                  NameComponent("test", "my_context");<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; NameComponent nc2 = new
                  NameComponent("Echo", "Object");<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; NameComponent path[] = { nc,nc2 };<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; EchoRef =
                  EchoHelper.narrow(ncRef.resolve(path));<br>
                  <br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (args.length &gt; 1) {<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SetInfo = args[1];<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } else {<br>
                  <br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println("Client Process Begin:
                  ");<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ReturnInfo = EchoRef.echoString("my corba
                  test");<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(ReturnInfo);<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; */<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } catch (Exception e) {<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println("ERROR : " + e);<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
                  &nbsp;&nbsp;&nbsp; }<br>
                  }<br>
                  -------------------------------<br>
                  <br>
                  When run the client :<br>
                  <br>
                  java EchoClient -ORBInitialPort 2809 <br>
                  <br>
                  gives this error :<br>
                  ERROR :
                  org.omg.CosNaming.NamingContextPackage.NotFound: IDL:<a
                    moz-do-not-send="true"
                    href="http://omg.org/CosNaming/NamingContext/NotFound:1.0"
                    target="_blank">omg.org/CosNaming/NamingContext/NotFound:1.0</a><br>
                  <br>
                  Can anyone help me please?<br>
                  <br>
                  Thanks for your attention.<br>
                  <br clear="all">
                  <span style="color: rgb(153, 153, 153);"></span>Best
                  regards,<br>
                  Valter Henrique.<br>
                  <br>
                  <div class="gmail_quote">2010/11/24 Valter Henrique <span
                      dir="ltr">&lt;<a moz-do-not-send="true"
                        href="mailto:valter.bcc@gmail.com"
                        target="_blank">valter.bcc@gmail.com</a>&gt;</span><br>
                    <blockquote class="gmail_quote" style="margin: 0pt
                      0pt 0pt 0.8ex; border-left: 1px solid rgb(204,
                      204, 204); padding-left: 1ex;">Sorry Duncan, but i
                      don't understand what you say, i'm new in CORBA.<br>
                      Could you give me an example, please ?<br>
                      <br>
                      Thanks.<br>
                      <br>
                      <br>
                      <div class="gmail_quote">2010/11/24 Duncan Grisby
                        <span dir="ltr">&lt;<a moz-do-not-send="true"
                            href="mailto:duncan@grisby.org"
                            target="_blank">duncan@grisby.org</a>&gt;</span>
                        <div>
                          <div><br>
                            <blockquote class="gmail_quote"
                              style="margin: 0pt 0pt 0pt 0.8ex;
                              border-left: 1px solid rgb(204, 204, 204);
                              padding-left: 1ex;">
                              <div>On Wed, 2010-11-24 at 05:55 -0800,
                                Valter Henrique wrote:<br>
                                <br>
                                &gt; i'm tryng do build a simple
                                application using 'echo' example.<br>
                                &gt;<br>
                                &gt; I have my client in Java:<br>
                                <br>
                              </div>
                              [...]<br>
                              <div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // locate
                                the service<br>
                                &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NameComponent
                                nc = new NameComponent("Echo", "");<br>
                                &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NameComponent
                                path[] = { nc };<br>
                                &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EchoRef =
                                EchoHelper.narrow(ncRef.resolve(path));<br>
                                <br>
                              </div>
                              [...]<br>
                              <div>&gt; java EchoClient -ORBInitialPort
                                2809<br>
                                &gt; ERROR :
                                org.omg.CosNaming.NamingContextPackage.NotFound:<br>
                                &gt; IDL:<a moz-do-not-send="true"
                                  href="http://omg.org/CosNaming/NamingContext/NotFound:1.0"
                                  target="_blank">omg.org/CosNaming/NamingContext/NotFound:1.0</a><br>
                                <br>
                              </div>
                              As the exception says, the name you have
                              looked up is not found. The eg3<br>
                              example uses the name
                              test.my_context/Echo.Object . You need to
                              either<br>
                              create the two NameComponents separately,
                              or use the<br>
                              NamingContextExt::resolve_str method that
                              will take the string form.<br>
                              <br>
                              Cheers,<br>
                              <br>
                              Duncan.<br>
                              <font color="#888888"><br>
                                --<br>
                                &nbsp;-- Duncan Grisby &nbsp; &nbsp; &nbsp; &nbsp; --<br>
                                &nbsp;-- <a moz-do-not-send="true"
                                  href="mailto:duncan@grisby.org"
                                  target="_blank">duncan@grisby.org</a>
                                &nbsp; &nbsp; --<br>
                                &nbsp; -- <a moz-do-not-send="true"
                                  href="http://www.grisby.org"
                                  target="_blank">http://www.grisby.org</a>
                                --<br>
                                <br>
                                <br>
                              </font></blockquote>
                          </div>
                        </div>
                      </div>
                      <br>
                    </blockquote>
                  </div>
                  <br>
                </div>
              </div>
              <pre><fieldset></fieldset>
_______________________________________________
omniORB-list mailing list
<div class="im"><a moz-do-not-send="true" href="mailto:omniORB-list@omniorb-support.com" target="_blank">omniORB-list@omniorb-support.com</a>
<a moz-do-not-send="true" href="http://www.omniorb-support.com/mailman/listinfo/omniorb-list" target="_blank">http://www.omniorb-support.com/mailman/listinfo/omniorb-list</a>
</div></pre>
            </blockquote>
            <br>
          </div>
        </blockquote>
      </div>
      <br>
    </blockquote>
    <br>
  </body>
</html>