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 Spiros Vazaloukas <sp...@nec-is.com> on 2007/02/26 10:41:05 UTC

OMElement.

Hello,

 

My server side logic returns an Array of Objects (Object[]).

But when I am trying to implement the relevant method in the Skeleton of
the service the response object requites an OMElement[].

 

How do I map/cast my Oblect[] to OMElement[] so that I return this to
the client?

 

Thanks

Spiros

 

 

 

/**

         * Auto generated method signature

         

          * @param param10

         

         */

        public  org.apache.ws.axis2.xsd.GetModelsDataResponse
getModelsData

                  (

          org.apache.ws.axis2.xsd.GetModelsData param10

          )

         

           {

                OrderMngService ordermngservice = new OrderMngService();

                org.apache.ws.axis2.xsd.GetModelsDataResponse
getmodelsdataresponse = new
org.apache.ws.axis2.xsd.GetModelsDataResponse();

                return getmodelsdataresponse.setReturnData(
ordermngservice.getModelsData(new Integer(1)) );   <-- MY METHOD RETURNS
Object[]

                        //Todo fill this with the necessary business
logic

                //throw new
java.lang.UnsupportedOperationException("Please implement " +
this.getClass().getName() + "#getModelsData");

        }

 

 

 


Re: OMElement.

Posted by Paul Fremantle <pz...@gmail.com>.
Spiros

It looks like you started with WSDL and specified an xs:any. Is that right?

The problem with xs:any is that it could be arbitrary XML, so Axis2's
codegen decides to not to map this, but instead lets you deal with the
raw XML yourself (using OMElement).

Paul

On 2/26/07, Spiros Vazaloukas <sp...@nec-is.com> wrote:
>
>
>
>
> Hello,
>
>
>
> My server side logic returns an Array of Objects (Object[]).
>
> But when I am trying to implement the relevant method in the Skeleton of the
> service the response object requites an OMElement[].
>
>
>
> How do I map/cast my Oblect[] to OMElement[] so that I return this to the
> client?
>
>
>
> Thanks
>
> Spiros
>
>
>
>
>
>
>
> /**
>
>          * Auto generated method signature
>
>
>
>           * @param param10
>
>
>
>          */
>
>         public
> org.apache.ws.axis2.xsd.GetModelsDataResponse getModelsData
>
>                   (
>
>           org.apache.ws.axis2.xsd.GetModelsData param10
>
>           )
>
>
>
>            {
>
>                 OrderMngService ordermngservice = new OrderMngService();
>
>
> org.apache.ws.axis2.xsd.GetModelsDataResponse
> getmodelsdataresponse = new
> org.apache.ws.axis2.xsd.GetModelsDataResponse();
>
>                 return getmodelsdataresponse.setReturnData(
> ordermngservice.getModelsData(new Integer(1)) );   ß MY METHOD RETURNS
> Object[]
>
>                         //Todo fill this with the necessary business logic
>
>                 //throw new
> java.lang.UnsupportedOperationException("Please implement "
> + this.getClass().getName() + "#getModelsData");
>
>         }
>
>
>
>
>
>


-- 
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org