473,379 Members | 1,253 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

.NET/JAVA Interoperability

Hi,
I'm facing some problem with respect to .NET client invoking a Java
WebService.
I'm able to access a Java WebService, whose binding is RPC/Encoded.But
the same
WebService when deployed using Document/Literal gives a problem.

Please find below my problem:
I have a method being exposed in Java WebService by name callMethod()
that returns a string.
The proxy generated for this method using wsdl.exe is as follows:

---------------------------------------------------------------------------
[System.Web.Services.Protocols.SoapDocumentMethodAt tribute("",
Use=System.Web.Services.Description.SoapBindingUse .Literal,
ParameterStyle=System.Web.Services.Protocols.SoapP arameterStyle.Bare)]
[return: System.Xml.Serialization.XmlElementAttribute("call MethodResponse",
Namespace="http://arun:8080/Training/services/Sample11")]
public callMethodResponse callMethod()
{
object[] results = this.Invoke("callMethod", new object[0]);
return ((callMethodResponse)(results[0]));
}
---------------------------------------------------------------------------

I invoke the method from C# using the following syntax:

------------------------------------------------------------
Sample11 obj = new Sample11();
callMethodResponse objRes;
objRes = obj.callMethod();
string str;
str = objRes.callMethodReturn;
------------------------------------------------------------

Initially I recieved an error saying "java.lang.exception:Body not
found".
I could set this right by changing the SoapParameterStyle in
SoapDocumentMethodAttribute
from SoapParameterStyle.Bare to SoapParameterStyle.Wrapped.

Now objRes has a null value.I'm not able to receive the simple string
"Hello", which I'm returning
from the Java WebService.

But everything works fine when RPC/Encoded is used.

Will be greatful if somebody could help me out in this.
Arun.
Nov 18 '05 #1
0 962

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: j-integra_support | last post by:
Looking for Java/COM interoperability tools? Thousands of companies world-wide are using J-Integra for COM for interoperability between Java and Microsoft COM applications. J-Integra for COM is a...
1
by: Sai Kit Tong | last post by:
Hi, I am developing a new application running on Windows platform that needs to interface with existing legacy code - written in basic C / C++. I am trying to evaluate Java vs C#...
3
by: Sai Kit Tong | last post by:
Hi, I am developing a new application running on Windows platform that needs to interface with existing legacy code - written in basic C / C++. I am trying to evaluate Java vs C#...
3
by: Sai Kit Tong | last post by:
I posted for help on legacy code interface 2 days ago. Probably I didn't make it clear in my original mail. I got a couple of answers but none of them address my issues directly (See attached...
2
by: Andrea | last post by:
Hi evrybody ! Does anybody know how to call a java class from a COM component ? Any suggestion ? Thanks Andrea
0
by: j-integra_support | last post by:
Looking for Java/.NET/CORBA interoperability tools? Intrinsyc Software has just released the latest addition to its popular J-Integra Interoperability Suite... J-Integra Espresso! J-Integra...
4
by: jos | last post by:
Hi There, What would be suitable options to exchange data between a Dot net program and a java program? Thanks Jyotsna Sharan
7
by: Christian Wilhelm | last post by:
Hi! I'm trying to call a Java WebService out of a .net Client. There are two Methods, one Method requires one Parameter of type Parameter, the other Method requires one Parameter of type...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.