• 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

Optional operation parameters (long types)

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm currently trying to get Apache Axis to allow nil elements for particular parameters to one of my methods. The parameters are of type long. When I deploy and try to send a request Axis responds with "No such operation". Below are some snippets of code

WSDL Sections


SOAP Request


SOAP Response


[ March 27, 2006: Message edited by: Steve Tallamy ]
[ March 27, 2006: Message edited by: Steve Tallamy ]
 
Steve Tallamy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Has anyone got any thoughts on this?
 
Steve Tallamy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Suprised nobody has a solution to this as I would assume it's quite a common requirement. Can anyone point me to someone or somewhere that could help with this?
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Theoretically you should be able to specify:
WSDL


That should then translate to an endpoint interface like

Note that the parameters of the endpoint interface are in fact java.lang.Long object references which can be set to "null" (i.e. they do not refer to an object at all) � something you cannot do with the intrinsic "long" type. Also in the part definition you are using "element" rather than "type".

However I have no idea whether Axis (WSDL2Java) supports this properly.
[ April 18, 2006: Message edited by: Peer Reynders ]
 
Steve Tallamy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the help - certainly looks like it should work. Unfortunately, wsdl2java does not create the end-point as you describe. I still uses primative longs instead of object Longs.

Could this be a limitation in Axis?

Are there any alternatives/work-arounds?
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According to the Axis User's Guide its supposed to work that way; see How your Java types map to SOAP/XML types.
However you are currently using SOAP Section 5 encoding (RPC/encoded).


For interop to work you need to change your binding to literal

[ April 19, 2006: Message edited by: Peer Reynders ]
 
Steve Tallamy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Even the change to literal doesn't work. Boo-hoo. Thanks for the idea anyway!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic