Results 1 to 4 of 4
  1. #1
    pauldj54 is offline Member
    Join Date
    Jul 2009
    Posts
    2
    Rep Power
    0

    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

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,792
    Rep Power
    19

    Default

    Quote 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?

  3. #3
    pauldj54 is offline Member
    Join Date
    Jul 2009
    Posts
    2
    Rep Power
    0

    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

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,792
    Rep Power
    19

    Default

    Quote 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.

Similar Threads

  1. Replies: 6
    Last Post: 04-04-2013, 10:36 PM
  2. Update Web Service Client
    By gio in forum Advanced Java
    Replies: 0
    Last Post: 09-26-2008, 10:21 AM
  3. java.lang.OutOfMemoryError in a web service client
    By elchape in forum Advanced Java
    Replies: 4
    Last Post: 06-28-2008, 05:21 PM
  4. create a Java Client to consume WEBSERVICES XML SOAP
    By Felissa in forum Web Frameworks
    Replies: 2
    Last Post: 05-16-2008, 06:42 AM
  5. Problem while running web service client
    By krsv36 in forum Other IDEs
    Replies: 0
    Last Post: 05-15-2008, 05:12 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •