You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Meeusen, Christopher W." <Me...@mayo.edu> on 2010/04/26 18:38:12 UTC

inheritance in axis2

Hi,

 

We are using axis2.4 we generate our services code first then use the
axis2 service archiver eclipse plugin to generate our WSDLs.  We are
having an issue when we try to use inheritance on our return objects.
We have several fields which will be returned by all of our service
methods, I've thrown those fields in a base class and extend that class
from other classes.  

 

Here is my base class:

 

public class ServiceResponse 

{

      private String advisoryMessage, replyCode;

      private boolean success;

 

      public ServiceResponse(String advisoryMessage, String replyCode,
boolean success) 

      {

            super();

            this.advisoryMessage = advisoryMessage;

            this.replyCode = replyCode;

            this.success = success;

      }

      public ServiceResponse()

      {

            

      }

      public String getAdvisoryMessage() {

            return advisoryMessage;

      }

      public void setAdvisoryMessage(String advisoryMessage) {

            this.advisoryMessage = advisoryMessage;

      }

      public String getReplyCode() {

            return replyCode;

      }

      public void setReplyCode(String replyCode) {

            this.replyCode = replyCode;

      }

      public boolean isSuccess() {

            return success;

      }

      public void setSuccess(boolean successful) {

            this.success = successful;

      }

}

 

Here is my subclass:

public class ImmunizationReportResult extends ServiceResponse

{

 

      public ImmunizationReportResult() 

      {

            super();

            // TODO Auto-generated constructor stub

      }

 

      public ImmunizationReportResult(String advisoryMessage, String
replyCode, boolean success) 

      {

            super(advisoryMessage, replyCode, success);

            // TODO Auto-generated constructor stub

      }

 

}

 

The two classes are in separate packages, there is no exception being
thrown, the issue is that my client apps can't see any of the fields in
the ImmunizationReportResult object.  The values for those fields are
the initial values even though I populate them in the service and SOAPUI
sees the fields being populated correctly.  I suspect there might be an
issue in the generated wsdl, does anyone know how to resolve this issue?

 

Thanks,

 

Chris