Difficulties in Consuming Java Web Services in .NET

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • BestofAbhi

    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.
  • Dino Chiesa [Microsoft]

    #2
    Re: Difficulties in Consuming Java Web Services in .NET

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


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

    -Dino


    "BestofAbhi " <BestofAbhi@dis cussions.micros oft.com> wrote in message
    news:58F463D7-9CEB-45F1-B5C7-095DC9362D51@mi crosoft.com...[color=blue]
    >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.[/color]


    Comment

    Working...