# org.omg.IOP

***

**1. Create an ORB without security**

```java
import org.omg.CORBA.ORB;
import org.omg.CORBA.ORBPackage.InvalidName;

public class CreateORB {

    public static void main(String[] args) {
        try {
            // Create an ORB instance without security
            ORB orb = ORB.init(args, null);
            // ...
        } catch (InvalidName e) {
            e.printStackTrace();
        }
    }
}
```

**2. Create an ORB with security**

```java
import org.omg.CORBA.ORB;
import org.omg.CORBA.ORBPackage.InvalidName;

public class CreateORBWithSecurity {

    public static void main(String[] args) {
        try {
            // Create an ORB instance with security
            ORB orb = ORB.init(args, new org.omg.CORBA.ORBInitializers() {});
            // ...
        } catch (InvalidName e) {
            e.printStackTrace();
        }
    }
}
```

**3. Get the ORB instance**

```java
import org.omg.CORBA.ORB;

public class GetORB {

    public static void main(String[] args) {
        // Get the ORB instance
        ORB orb = ORB.init(args, null);
        // ...
    }
}
```

**4. Create a request**

```java
import org.omg.CORBA.ORB;
import org.omg.CORBA.Request;
import org.omg.CORBA.string_to_wstringHelper;

public class CreateRequest {

    public static void main(String[] args) {
        try {
            // Get the ORB instance
            ORB orb = ORB.init(args, null);
            // Create a request
            Request request = orb.create_request("Hello", "sayHello", null);
            // ...
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
```

**5. Set the request arguments**

```java
import org.omg.CORBA.ORB;
import org.omg.CORBA.Request;
import org.omg.CORBA.string_to_wstringHelper;

public class SetRequestArguments {

    public static void main(String[] args) {
        try {
            // Get the ORB instance
            ORB orb = ORB.init(args, null);
            // Create a request
            Request request = orb.create_request("Hello", "sayHello", null);
            // Set the request arguments
            request.set_argument(0, string_to_wstringHelper.insert("Hello"));
            // ...
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
```

**6. Invoke the request**

```java
import org.omg.CORBA.ORB;
import org.omg.CORBA.Request;
import org.omg.CORBA.Response;

public class InvokeRequest {

    public static void main(String[] args) {
        try {
            // Get the ORB instance
            ORB orb = ORB.init(args, null);
            // Create a request
            Request request = orb.create_request("Hello", "sayHello", null);
            // Set the request arguments
            request.set_arguments(new org.omg.CORBA.Any[] { string_to_wstringHelper.insert("Hello") });
            // Invoke the request
            Response response = orb.invoke(request);
            // ...
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
```

**7. Get the response**

```java
import org.omg.CORBA.ORB;
import org.omg.CORBA.Request;

```
