Help coderanch get a
new server
by contributing to the fundraiser
  • 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

Axis 2 Binding question (Important)

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

I'm facing some peculiar problem here. I'm using Axis 2, ADB binding framework and a document literal style of WSDL.


I've the schema like above exposed through a single PortType. It has 2 operations : concat and updateUser.

I want concat to take 2 strings as input and updateUser to take a User object.

Because document style can take only 1 part, I've to think about concat. As I would like concat to take 2 strings and not 1 object having 2 strings, I define it according to wrapped method.
Operation name is same as schema type name. To force axis not to create Concat as a parameter java type, I use unwrap = true in wsdl2java task.

This works fine.

But this creates problem for updateUser method which takes a user, but unwrap=true makes it take updateUser(int,String) form.

I hope I'm being clear enough in this description of problem. Please advice if there is a way to have concat(string ,string) and updateUser(User) in java types that axis creates.

Thanks in advance.
-Amol
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use "unwrap". Pack the User element inside another xsd:complexType.

Axis2 unwrap only unwraps one level.

Do post the results please. I hope the above will solve the issue.
 
I child proofed my house but they still get in. Distract them with this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic