Problem solve Get help with specific problems with your technologies, process and projects.

Specifying the type inside an apachesoap:Vector type

How do you specify the type inside an apachesoap:Vector type? I have a complex type with sub-elements inside a Vector and don't know how to express this in WSDL.

I have a work-around for the problem:
I specify a dummy field of the type I want inside the vector somewhere else in the WSDL; this way that class is generated in Java and the de-serialization also works fine. However, I would like to know the right way to do this.
First and foremost -- don't expose Java collections through your WSDL interface. Turn that Vector into an array. Your WSDL interface should consist only of simple types, structures of simple types and arrays of simple types and/or structures of simple types.

Second -- if you insist on exposing collections through your interface, then your work-around (creating a dummy type to generate the serializer) is the right way to go. But be aware that you will encounter lots of interoperability issues.

Dig Deeper on Topics Archive

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.