I am new to web services. I have to write a standalone web service client. I have the wsdl for the web service. I used Axis2 libraries to generate the stubs from wsdl. The web service method takes a complex type as parameter and returns a complex type.My doubt is do i need a RPC mapping file at the client side?If I need one, how do i reference the mapping file from my standalone web service client.
Joined: Mar 22, 2005
Welcome to JavaRanch.
If you have generated the client classes from the WSDL, then all the mapping should be taken care of by the generated classes. Is that not the case?
As far as I know Axis 1.x never supported JAX-RPC mappings (they were only a requirement for certified J2EE 1.4 platforms (using JAX-RPC 1.1)). In Java EE 5 (which uses JAX-WS 2.0) JAX-RPC mappings were dropped. So again it is unlikely that Axis 2 supports JAX-RPC mappings as its implementation is guided by JAX-WS.
Originally posted by Ulf Dittmer: then all the mapping should be taken care of by the generated classes.
The idea of JAX-RPC mapping files was to support a type of (declarative) data-type coercion so that your weren't stuck with the standard WSDL-to-Java/Java-to-WSDL data type mapping. The JAX-RPC mapping file lets you specify WSDL-to-Java and Java-to-WSDL mappings to non-standard but compatible types.
In practice is was simpler to cast or transform the types programmatically, especially if your mappings weren't one-to-one over the entire application. [ July 24, 2007: Message edited by: Peer Reynders ]