Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Optional operation parameters (long types)

 
Steve Tallamy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Has anyone got any thoughts on this?
 
Steve Tallamy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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?
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • Quote
  • Report post to moderator
Even the change to literal doesn't work. Boo-hoo. Thanks for the idea anyway!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic