473,625 Members | 3,239 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Difficulties in Consuming Java Web Services in .NET

I am consuming Java Web Services in .NET. The Java Web Services have been
coded using Apache Axis.

The binding style in the WSDL is 'Document' and type is 'Literal'.

I have added these Java Web Services both as Web Reference and Reference (ie
dll generated using wsdl.exe) in the Project in order to access them. I am
able to get the output for web methods that return just a string. However
when it comes to complex data like an object / array , it returns me an
object with empty attribute values.

I have tried posting the XML Content to the Web Services using XML Spy and
it seems to work fine suggesting that there does not seem to be any problem
with the Web Service.

What could be the problem? Do we need to modify the .NET proxy that Visual
Studio.NET IDE generates when output is an object or whatever is generated by
default should work?

I have tried the same consuming a .NEt service and it works fine.

Hoping to hear from you soon.
Nov 23 '05 #1
1 4379
..NET interoperates with AXIS v1.x, if you design it properly.
How have you built the WSDL?
For best interop, build the WSDL first, then generate the AXIS (server-side)
artifacts with the WSDL2Java tool, specify --server-side to the command.
Then fill in your implementation.

Construct the .NET client in a similar manner, run wsdl.exe, or Add Web
Reference, specifying the WSDL file above. Do not specify the AXIS URL with
the ?wsdl to retrieve dynamically generated WSDL.

A working example of Arrays, with source code and makefile, is here:
http://dinoch.dyndns.org:7070/axis/AboutBasics.jsp

Complex types like structures, and arrays of structures, and structures with
arrays... they work the same as the simple array example.

-Dino
"BestofAbhi " <Be********@dis cussions.micros oft.com> wrote in message
news:58******** *************** ***********@mic rosoft.com...
I am consuming Java Web Services in .NET. The Java Web Services have been
coded using Apache Axis.

The binding style in the WSDL is 'Document' and type is 'Literal'.

I have added these Java Web Services both as Web Reference and Reference
(ie
dll generated using wsdl.exe) in the Project in order to access them. I am
able to get the output for web methods that return just a string. However
when it comes to complex data like an object / array , it returns me an
object with empty attribute values.

I have tried posting the XML Content to the Web Services using XML Spy and
it seems to work fine suggesting that there does not seem to be any
problem
with the Web Service.

What could be the problem? Do we need to modify the .NET proxy that Visual
Studio.NET IDE generates when output is an object or whatever is generated
by
default should work?

I have tried the same consuming a .NEt service and it works fine.

Hoping to hear from you soon.

Nov 23 '05 #2

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

Similar topics

3
3720
by: David Young | last post by:
Hi, I have been asked to write a client application for consuming a web service for a cms written in ASP 3.0. I have very little experience of developing on a microsoft platform, and very basic skills in ASP. I am a java programmer by trade, and have used java for achieving the same thing in the past. I have done some research on the subject, and am a little unsure on what is involved in developing the above. The web service simply...
0
2491
by: umhlali | last post by:
I get the following exception when my VB.NET app calls a Java web service that returns an array of objects. The same call works for a single object though. So looks like there is no problem serializing the object but there seems to be a problem serializing an array of objects. Any help will be appreciated "Cannot assign object of type System.Object to an object of type ElectronicWallet.C2PTest.PaymentItem." :...
4
2187
by: bob garbados | last post by:
I'm new to web services and I'm trying to interface with a payment gateway for an online store. I'm trying to do this without Visual Studio and I'm stuck... I created my proxy class from the command line with the following statement: wsdl https://webservices.innovativegateway.com/igspaymentservice/igspaymentservice.asmx?WSDL /l:vb /n:ECommerce.PaymentGateway /o:ECommerce.PaymentGateway.vb I then compiled it into a dll along with some...
1
8122
by: Samudrala | last post by:
Hi, I have developed a web service developed in C#. the WSDL I gave is working fine with .net client. But when java client consumes it always raising exception. I have basic knowledge of java too but never worked on consuming/producing web services. can any body send sample source code for java client so that i can test my web service in java client. thanx in advance samudrala
7
8889
by: Jamie Phillips | last post by:
I'm sure this topic has been "around the block" a few times, but I have not been able to find ANY solutin that fits this particular problem. I have written a Java Axis web service that has a method which returns an object with the following characteristics: public class MMPerson { public string firstName; public string surname; public int age; public MMAddress address;
0
1360
by: Abhijit Salvi | last post by:
I am consuming Java Web Services in .NET. The Java Web Services have been coded using Apache Axis. The binding style in the WSDL is 'Document' and type is 'Literal'. I have added these Java Web Services both as Web Reference and Reference (ie dll generated using wsdl.exe) in the Project in order to access them. I am able to get the output for web methods that return just a string. However when it comes to complex data like an object /...
1
1388
by: leslie_tighe | last post by:
Hello, I have a project setup to create a dll as a VB.NET Class library project. This dll is supposed to wrap to calls to web services so that I can utilize this in VB and other .NET environments. I am running in to problem in consuming the services that I have on a java server. I when I try to add a web reference to the project and in the wizard I enter the wsdl url, it brings up the methods in the service, but it also throws the...
3
6094
by: Jeremy Chapman | last post by:
I've writtin a very simple web service in axis which returns an array of classes. I consume it in a .net app. When receiving the response, my .net app generates an error "Cannot assign object of type System.Object to an object of type PersonWS.WorkGroupData.". I've included the wsdl of the consumed axis web service, the request/responses of the web service by the .net app and the exception and stack trace. Hoping someone can tell me...
4
1643
by: Scott M. | last post by:
Believe it or not, I've searched quite a bit and can't find any relevant information on how to consume a J2EE web service from a .NET consumer WITHOUT the aid of any 3rd party tools. I have two questions: 1. In a nutshell, how is this accomplished? 2. Are there any publicly available J2EE web services out there that I can try this against? I don't have the ability to create the J2EE side of the
0
8259
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8192
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8696
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8358
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5571
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4195
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1805
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.