JAVA works C# not !!!!!!!

H

Hovhannes Asatryan

Hello guys,
I'm newbie in .NET.

I have agent server works with SOAP protocol.

Added web service which have getFiles and setFiles methods.

SoapServer soapServer = (SoapServer)Activator.GetObject(typeof(SoapServer),
http://localhost:port/Server);
SoapServer is the interface with methodts to be called.

When I called soapServer.getFiles("$FRTL_XMLHOME", "etc", "xml");
it works OK, but when I tried to call setFiles it throws exception

"Unable to write data to the transport connection: An established connection
was aborted by the software in your host machine"

By the way with the same agent perfectly works java code no exceptions no
errors, the difference... client changed from java to .Net,

Language is C#.

Please help me with this problem.
 
J

jpuopolo

Hovhannes:

1. Check your permissions. Depending on how you have them set up, you may
have read access and not write access.

2. Check your server. Many times (like in Java) there are read-only and
write-only streams. You may have access to a read (input) stream and need to
access the associated write (output) stream.

Of course C# works. That's a silly statement. It is just not exactly
mimicking what you saw in Java.

John
 
H

Hovhannes Asatryan

jpuopolo:
sorry for my lack of information...
where I should check permissions?
The server is the same nothing changed, I have no server codes, it is
executable.
Let me to explain to you more detailed...
I have xxx.wsdl, in which described in addition to getFiles and setFiles a
lot of methods, all of them is also
works on JAVA.
I have added this wsdl to my project as WebReference
Write an interface to get the SAOP interface.
Calls getFiles
Object[] getFiles(String aHomeDirectory, String aHomeOffset, String
aFileTypes);

returns the for example list of xml file if aFileTypes specified "xml".

works perfect!!!

But when I trying to call setFiles

bool setFiles(String aHomeDirectory, String aHomeOffset, Object[] files);

it throws the exception.

I don't know where I need to check permissions and if it is for write
permission why throw this kind of exception?
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

Hovhannes said:
jpuopolo:
sorry for my lack of information...
where I should check permissions?
The server is the same nothing changed, I have no server codes, it is
executable.
Let me to explain to you more detailed...
I have xxx.wsdl, in which described in addition to getFiles and setFiles a
lot of methods, all of them is also
works on JAVA.
I have added this wsdl to my project as WebReference
Write an interface to get the SAOP interface.

Why? Just use the class that is created when you add the web reference.
Calls getFiles
Object[] getFiles(String aHomeDirectory, String aHomeOffset, String
aFileTypes);

returns the for example list of xml file if aFileTypes specified "xml".

works perfect!!!

But when I trying to call setFiles

bool setFiles(String aHomeDirectory, String aHomeOffset, Object[] files);

it throws the exception.

I don't know where I need to check permissions and if it is for write
permission why throw this kind of exception?
 
B

Bob Johnson

RE:
<< By the way with the same agent perfectly works java code no exceptions no
errors, the difference... client changed from java to .Net>>

If Java is so wonderful, why don't you just stay with it?

Really - why switch to .NET if it is so bad for you?

???
 
G

Guest

Your answer is correct if we all write the client and server ends of the
applications.

Probably because the customer is being told to offer service oriented
architecture solutions so that everyone can write codes in their favorite
flavor of the month, and have their client work. Typically example codes for
clients to follow are delivered with such products.
 
H

Hovhannes Asatryan

This is customer request to change all in NET.

Guys let's discuss the problem, PLEASE.
 
B

Bob Johnson

Re:
<< Guys let's discuss the problem, PLEASE>>

If you really want help, then you might want to become smarter about how you
ask your questions ()

Look at your subject line. It describes no specific problem and makes it
look like you are here to bash .NET - a perception that is further supported
by the text of your OP.

Maybe this was not your intention. If that is the case, then you might want
to be a bit more selective in how you present your problem. The link I
provide above provides great advice on how to effectively formulate a good
question.

-"Bob"
 
H

Hovhannes Asatryan

Thanks Bob.

Bob Johnson said:
Re:
<< Guys let's discuss the problem, PLEASE>>

If you really want help, then you might want to become smarter about how
you ask your questions
()

Look at your subject line. It describes no specific problem and makes it
look like you are here to bash .NET - a perception that is further
supported by the text of your OP.

Maybe this was not your intention. If that is the case, then you might
want to be a bit more selective in how you present your problem. The link
I provide above provides great advice on how to effectively formulate a
good question.

-"Bob"
 
G

Guest

Hovhannes said:
Let's not consider that I've meant Java better than C#....
Steps that I have done
I have server and wsdl which given by client, have no codes of server agent.
The agent is the installation pack wich is a service works by SOAP1.2
Create an console application->add web reference to project and select
the path of the wsdl file.
Write an interrface, declared the methods getFiles and setFiles.


static void Main(string[] args)

{

SoapServer srv = (SoapServer)Activator.GetObject(typeof(SoapServer),
http://localhost:30000/SoapServer);

Object[] objFiles = srv.getFiles("$FRTL_XMLHOME", "etc", "xml");

bool isSet = srv.setFiles("$FRTL_XMLHOME", "etc",
objFiles);

}
SoapServer as I mentioned is the interface.

If someone know what and where the problem say something helpful, but
not blame me for the question caption.

Is that how you do it in Java? How would that be better? ;)

As I said earlier; just use the class that was created when you added
the web reference. It already has the url of the web wervice and methods
declared for the methods in the web service.

Example:

using (WebRefName.ServiceName srv = new WebRefName.ServiceName()) {
Object[] objFiles = srv.getFiles("$FRTL_XMLHOME", "etc", "xml");
bool isSet = srv.setFiles("$FRTL_XMLHOME", "etc", objFiles);
}

If you want an interface around that class, it would just be a wrapper.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top