Click here to Skip to main content
15,879,683 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionProfile Provider in ASP.NET 2.0 WAP Pin
Majid Shahabfar21-Jul-06 22:35
Majid Shahabfar21-Jul-06 22:35 
AnswerRe: Profile Provider in ASP.NET 2.0 WAP Pin
minhpc_bk23-Jul-06 16:24
minhpc_bk23-Jul-06 16:24 
QuestionDownload a file from one site to another in asp.net Pin
Malayil alex21-Jul-06 21:47
Malayil alex21-Jul-06 21:47 
AnswerRe: Download a file from one site to another in asp.net Pin
Saifi Hasan22-Jul-06 18:18
Saifi Hasan22-Jul-06 18:18 
QuestionHow to load images. Pin
theintoehan21-Jul-06 21:16
theintoehan21-Jul-06 21:16 
AnswerRe: How to load images. Pin
tranglt21-Jul-06 23:04
tranglt21-Jul-06 23:04 
AnswerRe: How to load images. Pin
Not Active22-Jul-06 2:20
mentorNot Active22-Jul-06 2:20 
QuestionI have a Problem in the developement of Corba complient application Pin
zubairy21-Jul-06 21:03
zubairy21-Jul-06 21:03 
Hello every one,
I have a problem that i recieve null reference object exception in system.dll when i want to access Method of the dotnet application through java application. Below i give explaination of my work. That is my first corba complient application. I have follow the instructions as mentioned in the article below

http://www.codeproject.com/csharp/dist_object_system.asp


First i have created the server appplication named IIOPServer, code of this server application are written as follows,


IiopChannel objChannel = new IiopChannel(7999);
ChannelServices.RegisterChannel(objChannel);
RemoteMethods objMethods = new RemoteMethods();
RemotingServices.Marshal(objMethods , "remoteMethods");

and my RemoteMethods Class has the following methods

public double Add(double num1 , double num2)
{
return num1 + num2;
}
public double Subtract(double num1 , double num2)
{
return num1 - num2;
}
public double Divide(double num1 , double num2)
{
return num1 / num2;
}
public double Product(double num1 , double num2)
{
return num1 * num2;
}

after creating the server application, i creat its IDL file using IIOPNet utility, named as "CLSIDLGenerator" by writing the following lines in the command prompt ,

c:\iiop\iiopnet\CLSToIDLGenerator\bin\CLSToIDLGenerator RemoteMethods
-o c:\working\projects\IIOP\IIOPServer c:\working\projects\IIOP
\IIOPServer\bin\Debug\IIOPServer.dll.

Its create RemoteMethods.idl file in IIOPServer directory.

Then i convert this IDL file to java files using IDLJ utility of java, by wtitting the following lines.

C:\jdk1.4\bin>idlj -td c:\working\projects\iiop\iiopclient -i c:\jdk1.4\lib
-i c:\iiop\iiopnet\CLSToIDLGenerator\Bin C:\Working\Projects\IIOP\
IIOPServer\RemoteMethods.idl

its create five java files in the IIOPClient folder.

In the next step i write code of the IIOPClient application in java. Code the IIOPClient.java is as follows,

import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import Ch.Elca.Iiop.GenericUserException;
import IIOPServer.*;


class IIOPClient
{
public static void main(String[] args)
{
RemoteMethods m = null;
try {
InitialContext ic = new InitialContext();
Object obj = ic.lookup("remoteMethods");
m = (RemoteMethods) PortableRemoteObject.narrow(obj, RemoteMethods.class);

System.out.println("Addition: " + m.Add(20,4));
System.out.println("Subtraction: " + m.Subtract(20,4));
System.out.println("division: " + m.Divide(20,4));
System.out.println("Multiplication: " + m.Product(20,4));

} catch (Exception e) {
System.out.println("Exception: " + e.getMessage());
}
}
}

this file is saved in IIOPClient folder. Then i compile this java file to create its class file. And in next step i am going to run IIOPClient application by writting the following line of commands

C:\jdk1.4\bin>java -Djava.naming.factory.initial=com.sun.jndi.
cosnaming.CNCtxFactory -Djava.naming.provider.url=
iiop://localhost:7999 -classpath c:\working\proj
ects\iiop\iiopclient IIOPClient

but it could not find RemoteMethods object on port 7999 and give an error that

"NullReferenceObject" in System.dll





Good Luck


-- modified at 3:03 Saturday 22nd July, 2006
QuestionPrint Pin
MHASSANF21-Jul-06 21:00
MHASSANF21-Jul-06 21:00 
AnswerRe: Print Pin
VenkataRamana.Gali21-Jul-06 21:12
VenkataRamana.Gali21-Jul-06 21:12 
GeneralRe: Print Pin
MHASSANF21-Jul-06 22:04
MHASSANF21-Jul-06 22:04 
GeneralRe: Print Pin
VenkataRamana.Gali21-Jul-06 22:09
VenkataRamana.Gali21-Jul-06 22:09 
QuestionCell value is coming as blank Pin
VenkataRamana.Gali21-Jul-06 20:56
VenkataRamana.Gali21-Jul-06 20:56 
AnswerRe: Cell value is coming as blank Pin
ravikiranreddydharmannagari21-Jul-06 23:33
ravikiranreddydharmannagari21-Jul-06 23:33 
GeneralRe: Cell value is coming as blank Pin
VenkataRamana.Gali21-Jul-06 23:39
VenkataRamana.Gali21-Jul-06 23:39 
GeneralRe: Cell value is coming as blank Pin
_AK_22-Jul-06 0:07
_AK_22-Jul-06 0:07 
Questionhow to convert English date inot Islamic date Pin
nabeelkhan21-Jul-06 19:10
nabeelkhan21-Jul-06 19:10 
AnswerRe: how to convert English date inot Islamic date Pin
MHASSANF21-Jul-06 21:03
MHASSANF21-Jul-06 21:03 
AnswerRe: how to convert English date inot Islamic date Pin
VenkataRamana.Gali21-Jul-06 21:10
VenkataRamana.Gali21-Jul-06 21:10 
QuestionTo resize a datagrid(web appln using asp.net) in Vb.net Pin
micydon21-Jul-06 18:34
micydon21-Jul-06 18:34 
Questionasp and flash Pin
locaas21-Jul-06 13:06
locaas21-Jul-06 13:06 
QuestionPublish website. No output Pin
Mircea Grelus21-Jul-06 13:03
Mircea Grelus21-Jul-06 13:03 
AnswerRe: Publish website. No output Pin
minhpc_bk21-Jul-06 17:45
minhpc_bk21-Jul-06 17:45 
GeneralRe: Publish website. No output Pin
Mircea Grelus21-Jul-06 22:27
Mircea Grelus21-Jul-06 22:27 
AnswerRe: Publish website. No output Pin
Mircea Grelus22-Jul-06 0:10
Mircea Grelus22-Jul-06 0:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.