• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

again: c# apache axis arrays

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am struglling with a common problem but can't find the answer in the multitude of discussions, so i am...

a) write java service interface
b) use Java2WSDL to create wsdl file
c) use wsdl.exe to generate c# stub
d) deploy java service to tomcat/axis using RPC, Wrapped, Literal service configuration

so, i can pass simple javabeans to and fro but once a add an array to my java bean the contents do not get passed (i.e. array.length = 0). i've tried switching to document mode but then the C# code throws exceptions. i have looked at the wsdl and it seems to generate correctly, here's an extract....



what am i missing?
 
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is an example I always build from.
I also tend to always go from wsdl to source code.



The Array of Recording



HTH
[ November 08, 2005: Message edited by: James Clinton ]
 
paulm rhoades
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok - i tried doing wsdl -> java (using wsdl2Java) and wsdl -> c++ (using wsdl.exe) but still no joy deserializing an array in the C# client - i'm playing catchup here, but - i think my java side is ok - i've just used TCPMonitor and the object being passed from java service to the C# client contains correct entries (i.e. array elements) so it seems that the c# client is discarding the array data?
 
paulm rhoades
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok solved this - the problem was that the generated wsdl was incorrect...

<complexType name="ArrayOfPerformanceVO">
<sequence>
<element maxOccurs="unbounded" minOccurs="0" name="item" type="impl erformanceVO"/>
</sequence>
</complexType>

i replaced "item" with "pvos" as found in the xml returned by the java server and all worked fine.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic