• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Axis2 and String[] array issue

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All,

I have a strange problem with following:

A created a POJO class with following method:



I generated the WSDL automatically with java2wsdl

For info: The client is also Axis2

Everything works fine if I pass values for the 3 variables from the client to the server, the webservice body is like following:



But when only the documentID is passed, the body is:



and I get following error

ERROR: DocumentURI has not been defined: null

(This is an error the program throws when no DocumentID is defined).

When I do some debugging it seems that:
- the fieldnames array has 1 value, the value of the documentURI !?
- the fieldvalues array is empty
- the documentURI is null.

Isit not possible to pass empty arrays to a webservice ?

Is this a bug or am I doing something wrong ?

Let me know if you need more info.

Already thanks for reading this message.

Regards,

Stefan



 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stefan Geelen wrote:Is it not possible to pass empty arrays to a web service ?



See Array Gotcha - Null Array vs. Empty Array.
reply
    Bookmark Topic Watch Topic
  • New Topic