This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See welcome thread
Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Complex type, using axis  RSS feed

Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to Soap, and using version 1.1 of axis, my question is about
complex type.

Code for the interface.

public class FamilyInterfaceImpl {
public Family getFamily(){
Family f = new Family("MyFamily", 5);
return f;

Code for Family Class.

public class Family {
private String familyName;
private int numberOfMembers;
public Family(){}
public Family(String familyName, int numberOfMembers){
this.familyName = familyName;
this.numberOfMembers = numberOfMembers;

To get the wsdl file I use the following command.
java org.apache.axis.wsdl.Java2WSDL -o
dl -l"http://localhost:8080/axis/services/soapexample"
-n urn:soapexample -p"soapexample" urn:soapexample
where soapexample is the package name.

Now I have to generate the Server-side Wrapper Code and Stubs for Client

Access I use the following command.
java org.apache.axis.wsdl.WSDL2Java -o . -d Session -s -p

I got 8 file and one of them that I have to overwrite is
import soapexample.FamilyInterfaceImpl;
public class SoapexampleSoapBindingImpl implements{
FamilyInterfaceImpl f = new FamilyInterfaceImpl();
public getFamily() throws java.rmi.RemoteException {
return f.getFamily();

This class does not compile, because the return type is of type and the method return soapexample.Family.

Question: How to make soap axis work for complex type

Thank you in advance
I love a good mentalist. And so does this tiny ad:
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!