Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-14-2009, 02:43 PM
Member
 
Join Date: Jul 2009
Posts: 2
Rep Power: 0
pauldj54 is on a distinguished road
Cool Consume a .net web service with a java client
Hi,

I have to pass 3 xml file to a web service in .Net from a java client.

I wrote a webmethod in c# within the web service that recieved 3 XmlDocument as the arguments.

I'm using eclipse and the axis pluggin to build the client in java

The axis generate the webmethods and other classses using the WSDL

I wrote a webmethod to sum 2 integers without problems because only simple types are involved but my BIG PROBLEM is, How to use other types?

if I instantiate a proxy class to call the ws methods and use a java "Document" instances as arguments I recieved an error (MessageElement[] are expected )

Any help will be apreciated
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 07-14-2009, 06:25 PM
Senior Member
 
Join Date: Apr 2009
Posts: 944
Rep Power: 1
Tolls is on a distinguished road
Default
Originally Posted by pauldj54 View Post
Hi,

I have to pass 3 xml file to a web service in .Net from a java client.

I wrote a webmethod in c# within the web service that recieved 3 XmlDocument as the arguments.

I'm using eclipse and the axis pluggin to build the client in java

The axis generate the webmethods and other classses using the WSDL

I wrote a webmethod to sum 2 integers without problems because only simple types are involved but my BIG PROBLEM is, How to use other types?

if I instantiate a proxy class to call the ws methods and use a java "Document" instances as arguments I recieved an error (MessageElement[] are expected )

Any help will be apreciated
What does the WSDL for the service look like?
Did you write the C# code and then generate a WSDL from that?
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-14-2009, 06:35 PM
Member
 
Join Date: Jul 2009
Posts: 2
Rep Power: 0
pauldj54 is on a distinguished road
Default
Yes, that's it, I wrote the web service using c# and published it with visual studio 2008, and I'm making the client in java with eclipse

Somebody told me to use jax-ws instead of axis 1

I'm trying to convert the .xml docs into Strings and viceversa

Any suggestions will be appreciate

cheers

Paul
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 07-15-2009, 12:53 PM
Senior Member
 
Join Date: Apr 2009
Posts: 944
Rep Power: 1
Tolls is on a distinguished road
Default
Originally Posted by pauldj54 View Post
Yes, that's it, I wrote the web service using c# and published it with visual studio 2008, and I'm making the client in java with eclipse

Somebody told me to use jax-ws instead of axis 1

I'm trying to convert the .xml docs into Strings and viceversa

Any suggestions will be appreciate

cheers

Paul
This is part of the problem with writing the code first, rather than writing the WSDL. You don't always get what you expect. Now, though I can't see the WSDL here, I'm fairly certain that what was generated will not be something compatible with a Document class in java, after all it was generated using whatever equivalent class it is in C#.

If you simply want to transmit them as strings then you ought to define the WSDL methods in terms of strings (though that might be overly simplistic). You could also use attachments, but I've not needed to do that as yet so couldn't really advise you on that.
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Tags
.net, axis, eclipse, web services

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems to build a Java Client to consume a C# WebService slorde Advanced Java 4 03-17-2009 10:16 PM
Update Web Service Client gio Advanced Java 0 09-26-2008 11:21 AM
java.lang.OutOfMemoryError in a web service client elchape Advanced Java 4 06-28-2008 06:21 PM
create a Java Client to consume WEBSERVICES XML SOAP Felissa Web Frameworks 2 05-16-2008 07:42 AM
Problem while running web service client krsv36 Other IDEs 0 05-15-2008 06:12 PM


All times are GMT +2. The time now is 05:51 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org