axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Suriarachchi" <amilasuriarach...@gmail.com>
Subject Re: problem using adb in axis2
Date Fri, 05 Oct 2007 06:29:23 GMT
On 10/5/07, Abhijat Thakur <athakur@bdnacorp.com> wrote:
>
>  Hi,
>
> I am new to Axis2 and have been struggling with Axis for some time
> and i really need help in this regards. I have read most of the
> documentation and articles but i am unable to get some of the questions
> resolved.
>
> I have existing API's that i want to publish as web service. Some of these
> API's have return type of complex data types. Method signature for one of my
> service is
>
> public class Service {
>     public AgentRequest[] receiveAgentRequest(String endPointSource)
> throws Exception
>
> }
>
> The class definition for AgentRequest is
>
> public class AgentRequest {
>
>     private m_argument;
>
>     private DBComponent m_component; // This is our own data type which
> further might have some other data types in it.
>
> }
>
> I was able to generate the wsdl and used the wsdl2Java to generate the
> client side code using ADB. On the client the Service stub that was
> generated for me had a method signature for the above service method as
>
> public com.bdna.mbus.server.MbusWrapperStub.ReceiveAgentRequestsResponsereceiveAgentRequests(
>
> com.bdna.mbus.server.MbusWrapperStub.ReceiveAgentRequestsreceiveAgentRequests)
>
>  throws java.rmi.RemoteException {
>
> }
>
> However the Stub class created an inner class of AgentRequest and the
> com.bdna.mbus.server.MbusWrapperStub.ReceiveAgentRequestsResponseget_return() methods
returns me an array of object of AgentRequest of the
> innner class of Stub rather than my implementation of AgentRequest.
>

Do not use wsdl2java tool to generate code. It generates the data binding
classes as well. Try to use the RPCServiceClient.

I am stuck here and dont know how to proceed. Is this the way it is supposed
> to happen ? Also do i need to generate the server side code? In case i don't
> then in the service.xml file what would be my Message Receiver because the
> Message Receiver gets generated when we generate the Server side code. Also
> when i generate the server side code it generates me a class(extends
> ADBBean) for every data type that exists in the wsdl. However i already have
> my own implementation of these classes. In some methods i was returning a
> Map and the wsdl2Java for server side code even generated the Map class
> which extends the ADBBean class. I am lost here. Can i just use POJO for my
> implementation and not generate any code and just write the client myself.
>
> I would really appreciate help in this regards.
>
> regards
>
> abhijat
>
>
>   ------------------------------
>   This email and any files transmitted with it are confidential and are
> intended solely for the use of the individual or entity to whom they are
> addressed. This communication may contain material protected by the
> attorney-client privilege. If you are not the intended recipient, be advised
> that any use, dissemination, forwarding, printing or copying is strictly
> prohibited. If you have received this email in error, please contact the
> sender and delete all copies.
>



-- 
Amila Suriarachchi,
WSO2 Inc.

Mime
View raw message