title: PL SQL object type to java
body: <p>I would like to pass the <code>plsql</code> object type pass to Java. Java will get this object and after modification, I want to pass back the same object to <code>plsql</code>.
  Main program will be calling from <code>plsql</code> to Java and the expecting result return from java is to same object at <code>plsql</code>. May I know if there is anyway to ?
  Following is the code that I'm trying on it. 
  Can plsql object type directly to java method/function as in and out paramter?
  I tried to pass the plsql object type with Struct, it can able to compile the program. However, I do not know how can java accept this object and to be converted to java object. </p>
  
  <p>Something like below example. Thank you very much </p>
  
  <h2>PL/SQL object Type</h2>
  
  <pre><code>CREATE OR REPLACE TYPE Address AS OBJECT
  ( street VARCHAR2(30),
     city VARCHAR2(20)
  );
  </code></pre>
  
  <h2>PL/SQL Package calling java program</h2>
  
  <pre><code>create or replace package body TYPE_ADD_TEST is
  FUNCTION Test_ADD(in_address IN address
                  ) RETURN address IS
  LANGUAGE JAVA
  NAME 'TestPrg.TestAddress(java.sql.Struct
                     ) return java.sql.Struct';
  end TYPE_ADD_TEST;
  </code></pre>
  
  <h2>Java code</h2>
  
  <pre><code>create or replace and compile java source named testprg as
  import java.util.*;
  import java.io.*;
  import java.sql.*;
  
  public class TestPrg{
  
      public static String TestAddress(Struct TestAddress) {
  
          Address testAdd = (Address) TestAddress; 
          // Address testAdd = new Address("s","c"); 
          return testAdd.street;
      }
  
  }
  </code></pre>
  
  <h2>Java Object Class</h2>
  
  <pre><code>create or replace and compile java source named address as
  import java.util.*;
  import java.io.*;
  
  public class Address {
  
      public String street ;
      public String city;  
      public Address() {}
      public Address(String a, String  b) {
          street = "java street";
          city = "java city";
      }
  }
  </code></pre>
  
  <p>Thank you very much</p>