RE: problem with returning array of objects

2009-09-11 Thread Pär Malmqvist

Thanks Alberto and Amila.
It worked!

/Pär

Date: Fri, 11 Sep 2009 09:54:15 +0530
Subject: Re: problem with returning array of objects
From: amilasuriarach...@gmail.com
To: axis-user@ws.apache.org

change the element into a complex type.














thanks,
Amila.
   


On Thu, Sep 10, 2009 at 6:15 PM, Pär Malmqvist  
wrote:






Hello!

Thanks Amila för your reply.
I changed the row 
into 

as you suggested.

When I check the generated file GetAtcsByAtcCodeResponse.java this time I see 
no field at all that could hold the array value.

What could be the problem? 

/Pär Malmqvist











Date: Wed, 9 Sep 2009 19:18:28 +0530
Subject: Re: problem with returning array of objects
From: amilasuriarach...@gmail.com

To: axis-user@ws.apache.org



On Wed, Sep 9, 2009 at 6:48 PM, Pär Malmqvist  wrote:







Hello!

I have problem with generating server side code from my wsdl file.
The wsdl file contains a service, getAtcsByAtcCode, that should return an array 
of Atc-objects.
But my generated code returns OMElement[] instead. 



I use this wsdl file:


http://main.sol";
xmlns:apachesoap="http://xml.apache.org/xml-soap"; 


xmlns:tns="http://main.sol";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";


xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>



http://main.sol";
xmlns="http://www.w3.org/2001/XMLSchema";


xmlns:apachesoap="http://xml.apache.org/xml-soap";
xmlns:tns="http://main.sol"; xmlns:intf="http://main.sol";


xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>







































this type should be a complex type. not an element.

thanks,
Amila.





















































http://schemas.xmlsoap.org/soap/http"/>
























http://localhost:8080/axis2/services/SolDB2"/>









I generate my service with the following ant task:

(lib directory contains all Axis2 jars) 






















  









When I check the generated file GetAtcsByAtcCodeResponse.java I see that the 
object contains an


array of org.apache.axiom.om.OMElement[] instead of sol.main.Atc[].


Is there something wrong with my wsdl file?
Or is this the way to do when returning array of objects at the service side?

Regards



Pär Malmqvist



Share your memories online with anyone you want anyone you want.




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

With Windows Live, you can organize, edit, and  share your photos.



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

_
Drag n’ drop—Get easy photo sharing with Windows Live™ Photos.

http://www.microsoft.com/windows/windowslive/products/photos.aspx

Re: problem with returning array of objects

2009-09-10 Thread Amila Suriarachchi
change the element into a complex type.












thanks,
Amila.


On Thu, Sep 10, 2009 at 6:15 PM, Pär Malmqvist wrote:

>  Hello!
>
> Thanks Amila för your reply.
> I changed the row  name="return" type="tns:Atc"/>
> into  type="tns:Atc"/>
> as you suggested.
>
> When I check the generated file GetAtcsByAtcCodeResponse.java this time I
> see no field at all that could hold the array value.
>
> What could be the problem?
>
> /Pär Malmqvist
>
>
>
>
>
>
>
>
>
> --------------
> Date: Wed, 9 Sep 2009 19:18:28 +0530
> Subject: Re: problem with returning array of objects
> From: amilasuriarach...@gmail.com
> To: axis-user@ws.apache.org
>
>
>
>
> On Wed, Sep 9, 2009 at 6:48 PM, Pär Malmqvist 
> wrote:
>
>  Hello!
>
> I have problem with generating server side code from my wsdl file.
> The wsdl file contains a service, getAtcsByAtcCode, that should return an
> array of Atc-objects.
> But my generated code returns OMElement[] instead.
>
> I use this wsdl file:
>
> 
> http://main.sol";
> xmlns:apachesoap="http://xml.apache.org/xml-soap";
> xmlns:tns="http://main.sol";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
> 
> http://main.sol";
> xmlns="http://www.w3.org/2001/XMLSchema";
> xmlns:apachesoap="http://xml.apache.org/xml-soap";
> xmlns:tns="http://main.sol"; xmlns:intf="http://main.sol";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
>
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
> 
>  name="return" type="tns:Atc"/>
>
>
> this type should be a complex type. not an element.
>
> thanks,
> Amila.
>
> 
> 
> 
>
> 
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
>
> 
> 
> 
>
> 
> 
> 
>
> 
> 
> 
>
> 
> 
>  name="getAtcsByAtcCodeRequest"/>
>  name="getAtcsByAtcCodeResponse"/>
>  name="SolExceptionFault"/>
> 
> 
>
> 
> http://schemas.xmlsoap.org/soap/http"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
> http://localhost:8080/axis2/services/SolDB2"/>
> 
> 
>
> 
>
>
>
> I generate my service with the following ant task:
>
> (lib directory contains all Axis2 jars)
>
>
> 
>
> 
> 
> 
>
> 
> 
> 
> 
> 
> 
> 
> 
>   
> 
> 
> 
> 
>
>
>
> When I check the generated file GetAtcsByAtcCodeResponse.java I see that
> the object contains an
> array of org.apache.axiom.om.OMElement[] instead of sol.main.Atc[].
>
>
> Is there something wrong with my wsdl file?
> Or is this the way to do when returning array of objects at the service
> side?
>
> Regards
>
> Pär Malmqvist
>
>
>
> --
> Share your memories online with anyone you want anyone you 
> want.<http://www.microsoft.com/middleeast/windows/windowslive/products/photos-share.aspx?tab=1>
>
>
>
>
> --
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
>
> --
> With Windows Live, you can organize, edit, and share your 
> photos.<http://www.microsoft.com/middleeast/windows/windowslive/products/photo-gallery-edit.aspx>
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: problem with returning array of objects

2009-09-10 Thread Alberto Patino
Replace
 











with complexType only

On Thu, Sep 10, 2009 at 7:45 AM, Pär Malmqvist wrote:

>  Hello!
>
> Thanks Amila för your reply.
> I changed the row  name="return" type="tns:Atc"/>
> into  type="tns:Atc"/>
> as you suggested.
>
> When I check the generated file GetAtcsByAtcCodeResponse.java this time I
> see no field at all that could hold the array value.
>
> What could be the problem?
>
> /Pär Malmqvist
>
>
>
>
>
>
>
>
>
> --------------
> Date: Wed, 9 Sep 2009 19:18:28 +0530
> Subject: Re: problem with returning array of objects
> From: amilasuriarach...@gmail.com
> To: axis-user@ws.apache.org
>
>
>
>
> On Wed, Sep 9, 2009 at 6:48 PM, Pär Malmqvist 
> wrote:
>
>  Hello!
>
> I have problem with generating server side code from my wsdl file.
> The wsdl file contains a service, getAtcsByAtcCode, that should return an
> array of Atc-objects.
> But my generated code returns OMElement[] instead.
>
> I use this wsdl file:
>
> 
> http://main.sol";
> xmlns:apachesoap="http://xml.apache.org/xml-soap";
> xmlns:tns="http://main.sol";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
> 
> http://main.sol";
> xmlns="http://www.w3.org/2001/XMLSchema";
> xmlns:apachesoap="http://xml.apache.org/xml-soap";
> xmlns:tns="http://main.sol"; xmlns:intf="http://main.sol";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
>
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
> 
>  name="return" type="tns:Atc"/>
>
>
> this type should be a complex type. not an element.
>
> thanks,
> Amila.
>
> 
> 
> 
>
> 
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
>
> 
> 
> 
>
> 
> 
> 
>
> 
> 
> 
>
> 
> 
>  name="getAtcsByAtcCodeRequest"/>
>  name="getAtcsByAtcCodeResponse"/>
>  name="SolExceptionFault"/>
> 
> 
>
> 
> http://schemas.xmlsoap.org/soap/http"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
> http://localhost:8080/axis2/services/SolDB2"/>
> 
> 
>
> 
>
>
>
> I generate my service with the following ant task:
>
> (lib directory contains all Axis2 jars)
>
>
> 
>
> 
> 
> 
>
> 
> 
> 
> 
> 
> 
> 
> 
>   
> 
> 
> 
> 
>
>
>
> When I check the generated file GetAtcsByAtcCodeResponse.java I see that
> the object contains an
> array of org.apache.axiom.om.OMElement[] instead of sol.main.Atc[].
>
>
> Is there something wrong with my wsdl file?
> Or is this the way to do when returning array of objects at the service
> side?
>
> Regards
>
> Pär Malmqvist
>
>
>
> --
> Share your memories online with anyone you want anyone you 
> want.<http://www.microsoft.com/middleeast/windows/windowslive/products/photos-share.aspx?tab=1>
>
>
>
>
> --
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
>
> --
> With Windows Live, you can organize, edit, and share your 
> photos.<http://www.microsoft.com/middleeast/windows/windowslive/products/photo-gallery-edit.aspx>
>



-- 
Don't be evil!!!


RE: problem with returning array of objects

2009-09-10 Thread Pär Malmqvist

Hello!

Thanks Amila för your reply.
I changed the row 
into 
as you suggested.

When I check the generated file GetAtcsByAtcCodeResponse.java this time I see 
no field at all that could hold the array value.

What could be the problem? 

/Pär Malmqvist











Date: Wed, 9 Sep 2009 19:18:28 +0530
Subject: Re: problem with returning array of objects
From: amilasuriarach...@gmail.com
To: axis-user@ws.apache.org



On Wed, Sep 9, 2009 at 6:48 PM, Pär Malmqvist  wrote:






Hello!

I have problem with generating server side code from my wsdl file.
The wsdl file contains a service, getAtcsByAtcCode, that should return an array 
of Atc-objects.
But my generated code returns OMElement[] instead. 


I use this wsdl file:


http://main.sol";
xmlns:apachesoap="http://xml.apache.org/xml-soap"; 

xmlns:tns="http://main.sol";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";

xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>


http://main.sol";
xmlns="http://www.w3.org/2001/XMLSchema";

xmlns:apachesoap="http://xml.apache.org/xml-soap";
xmlns:tns="http://main.sol"; xmlns:intf="http://main.sol";

xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>

































this type should be a complex type. not an element.

thanks,
Amila.














































http://schemas.xmlsoap.org/soap/http"/>




















http://localhost:8080/axis2/services/SolDB2"/>








I generate my service with the following ant task:

(lib directory contains all Axis2 jars) 



















  








When I check the generated file GetAtcsByAtcCodeResponse.java I see that the 
object contains an

array of org.apache.axiom.om.OMElement[] instead of sol.main.Atc[].


Is there something wrong with my wsdl file?
Or is this the way to do when returning array of objects at the service side?

Regards


Pär Malmqvist



Share your memories online with anyone you want anyone you want.



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

_
With Windows Live, you can organize, edit, and share your photos.
http://www.microsoft.com/middleeast/windows/windowslive/products/photo-gallery-edit.aspx

Re: problem with returning array of objects

2009-09-09 Thread Amila Suriarachchi
On Wed, Sep 9, 2009 at 6:48 PM, Pär Malmqvist wrote:

>  Hello!
>
> I have problem with generating server side code from my wsdl file.
> The wsdl file contains a service, getAtcsByAtcCode, that should return an
> array of Atc-objects.
> But my generated code returns OMElement[] instead.
>
> I use this wsdl file:
>
> 
> http://main.sol";
> xmlns:apachesoap="http://xml.apache.org/xml-soap";
> xmlns:tns="http://main.sol";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
> 
> http://main.sol";
> xmlns="http://www.w3.org/2001/XMLSchema";
> xmlns:apachesoap="http://xml.apache.org/xml-soap";
> xmlns:tns="http://main.sol"; xmlns:intf="http://main.sol";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
>
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
> 
>  name="return" type="tns:Atc"/>
>

this type should be a complex type. not an element.

thanks,
Amila.


> 
> 
>
> 
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
>
> 
> 
> 
>
> 
> 
> 
>
> 
> 
> 
>
> 
> 
>  name="getAtcsByAtcCodeRequest"/>
>  name="getAtcsByAtcCodeResponse"/>
>  name="SolExceptionFault"/>
> 
> 
>
> 
> http://schemas.xmlsoap.org/soap/http"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
> http://localhost:8080/axis2/services/SolDB2"/>
> 
> 
>
> 
>
>
>
> I generate my service with the following ant task:
>
> (lib directory contains all Axis2 jars)
>
>
> 
>
>     
> 
> 
>
> 
> 
> 
> 
> 
> 
> 
> 
>   
> 
> 
> 
> 
>
>
>
> When I check the generated file GetAtcsByAtcCodeResponse.java I see that
> the object contains an
> array of org.apache.axiom.om.OMElement[] instead of sol.main.Atc[].
>
>
> Is there something wrong with my wsdl file?
> Or is this the way to do when returning array of objects at the service
> side?
>
> Regards
>
> Pär Malmqvist
>
>
>
> --
> Share your memories online with anyone you want anyone you 
> want.<http://www.microsoft.com/middleeast/windows/windowslive/products/photos-share.aspx?tab=1>
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


problem with returning array of objects

2009-09-09 Thread Pär Malmqvist

Hello!

I have problem with generating server side code from my wsdl file.
The wsdl file contains a service, getAtcsByAtcCode, that should return an array 
of Atc-objects.
But my generated code returns OMElement[] instead. 

I use this wsdl file:


http://main.sol";
xmlns:apachesoap="http://xml.apache.org/xml-soap"; 
xmlns:tns="http://main.sol";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>

http://main.sol";
xmlns="http://www.w3.org/2001/XMLSchema";
xmlns:apachesoap="http://xml.apache.org/xml-soap";
xmlns:tns="http://main.sol"; xmlns:intf="http://main.sol";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>































































http://schemas.xmlsoap.org/soap/http"/>
















http://localhost:8080/axis2/services/SolDB2"/>







I generate my service with the following ant task:

(lib directory contains all Axis2 jars) 
















  







When I check the generated file GetAtcsByAtcCodeResponse.java I see that the 
object contains an
array of org.apache.axiom.om.OMElement[] instead of sol.main.Atc[].


Is there something wrong with my wsdl file?
Or is this the way to do when returning array of objects at the service side?

Regards

Pär Malmqvist



_
Share your memories online with anyone you want.
http://www.microsoft.com/middleeast/windows/windowslive/products/photos-share.aspx?tab=1

Help: How to passing array of objects to service in Client side

2008-05-22 Thread Teresa Yuan
Does anybody have a working example for passing array of complex type to a 
service? I have no problem of getting a array of complex type back. The 
following is the details of my program.

I got error: No such operation 'returnOrder' when trying passing a 
arrayOfObject to the service.
-- The service looks like:
 package samples.userguide.example5;
 public class BeanService
     {
  public Order[] returnOrder(Order [] order) {

  for (int i = 0; i < order.length; i++) {
  order[i].setCustomerName(i +"_"+order[i].getCustomerName());
  }
  return order;
   }
    }
-- the deploy.wsdd looks like:
   http://xml.apache.org/axis/wsdd/"; 
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
    
    
    
    
  
    http://schemas.xmlsoap.org/soap/encoding/"/>
  
  

-- the client code:
    Service  service = new Service();
    Call call    = (Call) service.createCall();
    QName    qnOrder  = new QName( "urn:BeanService", "Order" );
    QName    qnOrderArray = new QName( "urn:BeanService", 
"ArrayOfOrder" );

    call.registerTypeMapping(Order.class, qnOrder,
  new 
org.apache.axis.encoding.ser.BeanSerializerFactory(Order.class, qnOrder),
  new 
org.apache.axis.encoding.ser.BeanDeserializerFactory(Order.class, qnOrder));
    call.registerTypeMapping(Order[].class, qnOrderArray,
   new org.apache.axis.encoding.ser.ArraySerializerFactory(),
   new org.apache.axis.encoding.ser.ArrayDeserializerFactory());
    String result = "";
    Order [] m_order;
    try {
    call.setTargetEndpointAddress( new 
java.net.URL("http://localhost:8080/axis/services/OrderProcessor";) );
    call.addParameter( "arg1", qnOrderArray, ParameterMode.IN );
    call.setOperationName( new QName("OrderProcessor", "returnOrder") );
   call.setReturnType( qnOrderArray );
    m_order = (Order []) call.invoke( new Object[] { order });
    ..
Thanks
Teresa




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Converting array of objects to OMElement

2008-04-11 Thread Tikayatray, Lokajit

Thanks Raghu.
 After going thr' the article, I am able to create and send request
after converting my array of objects to OMElement and also able to get
back the response xml. But I am unable to deserialize it on client side
using the below line of code:

Object[] responseArray = BeanUtil.deserialize(omElementResp, new
Object[]{new OutputSet()}, new AxisService().getObjectSupplier());

It is giving below exception:
java.lang.ClassCastException: com.citi.gwm.grid.calculator.OutputSet

My response XML is as below:


   http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  
 http://grid.gwm.citi.com";>

   A
   2640


   B
   6042


   C
   6044


   D
   6046

 
  
   


Can any one please help me in solving this exception.


Thanks and Regards
Lokajit Tikayatray
-Original Message-
From: Raghu Upadhyayula [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 10, 2008 8:04 PM
To: axis-user@ws.apache.org
Subject: RE: Converting array of objects to OMElement

Hi Lokajit,

Someone in the forum replied to this some days ago ... here's
the link which tell you how to convert a Java bean to OMELement ...

http://wso2.org/library/332

Thanks
Raghu

-Original Message-
From: Tikayatray, Lokajit [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 10, 2008 4:52 PM
To: axis-user@ws.apache.org
Subject: Converting array of objects to OMElement


Hi All,
I have an array of java custom objects. I need to convert them to
OMElements. Can anybody help me in this regard.
Sample code or any helpful link is much appreciated.


Thanks and Regards
Lokajit Tikayatray

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Converting array of objects to OMElement

2008-04-10 Thread Raghu Upadhyayula
Hi Lokajit,

Someone in the forum replied to this some days ago ... here's
the link which tell you how to convert a Java bean to OMELement ...

http://wso2.org/library/332

Thanks
Raghu

-Original Message-
From: Tikayatray, Lokajit [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 10, 2008 4:52 PM
To: axis-user@ws.apache.org
Subject: Converting array of objects to OMElement


Hi All,
I have an array of java custom objects. I need to convert them to
OMElements. Can anybody help me in this regard.
Sample code or any helpful link is much appreciated.


Thanks and Regards
Lokajit Tikayatray

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Converting array of objects to OMElement

2008-04-10 Thread Tikayatray, Lokajit

Hi All,
I have an array of java custom objects. I need to convert them to
OMElements. Can anybody help me in this regard.
Sample code or any helpful link is much appreciated.


Thanks and Regards
Lokajit Tikayatray

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem getting Array of Objects in Java client

2008-03-05 Thread Christian Smith

Hi All,

Firstly, i'm quite new to SOAP and webservices :-)
Here's my problem:  I am trying to use a webservice (not mine) and 
having trouble getting an array of objects.  I think my problem lies in 
defining the type mapping and serializers/deserializers for it.


I have been struggling with this for a while, any help is greatly 
appreciated!


Thanks,
Christian


Heres part of the wsdl:



  



  

# cut #


  
type="vbox:IHardDiskAttachment"/>

  

# cut #

Here's my java client code:

  public IHardDisk getHardDisk(){
  IHardDisk retCode = null;
try {
  Call call = getCall();
  call.setReturnClass(Vector.class);
TypeMappingRegistry registry = 
call.getService().getTypeMappingRegistry();

  TypeMapping mapping = registry.createTypeMapping();
QName IHardDiskAttachmentArrayTypeQname = new 
QName(mor.getNameSpace(), "ArrayOfIHardDiskAttachment");
QName IHardDiskAttachmentArrayElementName = new 
QName("", "array");
  
mapping.register(IHardDiskAttachment[].class, 
IHardDiskAttachmentArrayTypeQname,
  new 
ArraySerializerFactory(IHardDiskAttachmentArrayTypeQname),
  new 
ArrayDeserializerFactory(IHardDiskAttachmentArrayTypeQname));

  registry.register("ArrayOfIHardDiskAttachment", mapping);
IHardDiskAttachment[] disks =
  (IHardDiskAttachment[])call.invoke(mor.getNameSpace(),
  "IMachine_getHardDiskAttachments",
  new Object[] { mor.getMOR() });
  } catch (Exception e) {
  e.printStackTrace();
  }
return retCode;
  }

I assume there are many places it is going wrong, lots of trial and 
error :-/


Here's the SOAP response sent form the server:

HTTP/1.1 200 OK
Server: gSOAP/2.7
Content-Type: text/xml; charset=utf-8
Content-Length: 562
Connection: close


xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:vbox="http://www.virtualbox.org/";>


  
  
  8bf184786b97a493-0012
  8bf184786b97a493-0013
  
  




Exception:

05-Mar-2008 11:39:31 org.apache.axis.client.Call invoke
SEVERE: Exception:
org.xml.sax.SAXException: SimpleDeserializer encountered a child 
element, which is NOT expected, in something it was trying to deserialize.
  at 
org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:145) 

  at 
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035) 

  at 
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165) 

  at 
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141) 

  at 
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)

  at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
  at org.apache.axis.client.Call.invoke(Call.java:2467)
  at org.apache.axis.client.Call.invoke(Call.java:2366)
  at com.sun.vda.agent.vb.IMachine.getHardDisk(IMachine.java:111)
  at com.sun.vda.agent.vb.VirtualBox.(VirtualBox.java:47)
  at com.sun.vda.agent.vb.VirtualBox.main(VirtualBox.java:136)
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXException: SimpleDeserializer encountered a 
child element, which is NOT expected, in something it was trying to 
deserialize.

faultActor:
faultNode:
faultDetail:
  {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: 
SimpleDeserializer encountered a child element, which is NOT expected, 
in something it was trying to deserialize.
  at 
org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:145) 

  at 
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035) 

  at 
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165) 

  at 
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141) 

  at 
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)

  at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
  at org.apache.axis.client.Call.invoke(Call.java:2467)
  at org.apache.axis.client.Call.invoke(Call.java:2366)
  at com.sun.vda.agent.vb.IMachine.getHardDisk(IMachine.java:111)
  at com.sun.vda.agent.vb.VirtualBox.<init>(VirtualBox.java:47)
  at com.sun.vda.agent.vb.VirtualBox.main(VirtualB

Re: Regarding Axis serialization of "user-defined object containing array of objects"

2008-01-31 Thread Pratiksha Powar
Hi Everybody,

I was able to solve my problem of serialization.
The solution is as follows:
I had to mark every member variable of my user-defined object "public".
Also I had to make a few modifications in my deployment descriptor. 
I got this info from
http://www.javaranch.com/journal/200603/WSComplexTypes.html


Now I'm facing a problem with deserializing the object on client side. 
My Object contains a 2D Array of objects of type java.lang.Object, 2 int
values and 1 String object.
While deserializing I'm getting the following error:

Caused by: org.xml.sax.SAXException: No object was found for class type
int
   at
org.apache.axis.encoding.ConstructorTarget.set(ConstructorTarget.java:97)
   at
org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:249)
   at
org.apache.axis.encoding.ser.ArrayDeserializer.valueComplete(ArrayDeserializer.java:583)
   at
org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:509)
   at
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
   at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171)
   at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
   at
org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:369)
   at
org.apache.axis.encoding.ser.BeanDeserializer.startElement(BeanDeserializer.java:154)
   at
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
   at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
   at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
   at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345)
   at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
   at org.apache.axis.client.Call.invoke(Call.java:2467)

I'm attaching my server-config.wsdd and my client-side program.
Can anyone help me here?

Thanks,
Pratiksha

On Tue, 2008-01-29 at 12:25 +0530, Pratiksha Powar wrote:
> Hi Everybody,
> 
> I'm trying to return a user-defined object which contains two primitives
> namely : int and Java String and a 2D array of objects of
> type :java.lang.Object
> Can you tell how should I map these objects in the server-config.wsdd
> file so that axis produces the correct wsdl ?
> I'm attaching my copy of server-config.wsdd.
> Also is it possible to write your own wsdl and make axis point to it?
> 
> Thanks,
> Pratiksha
> 
> 
> ==
> DISCLAIMER: The information in this message is confidential and may be 
> legally privileged. It is intended solely for the addressee. Access to this 
> message by anyone else is unauthorized. If you are not the intended 
> recipient, any disclosure, copying, or distribution of the message, or any 
> action or omission taken by you in reliance on it, is prohibited and may be 
> unlawful. Please immediately contact the sender if you have received this 
> message in error. Further, this e-mail may contain viruses and all reasonable 
> precaution to minimize the risk arising there from is taken by OnMobile. 
> OnMobile is not liable for any damage sustained by you as a result of any 
> virus in this e-mail. All applicable virus checks should be carried out by 
> you before opening this e-mail or any attachment thereto. 
> Thank you - OnMobile Global Limited.
> ==
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
package db;

import java.net.MalformedURLException;
import java.rmi.RemoteException;
import javax.xml.rpc.ServiceException;
import javax.xml.namespace.QName;

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.ser.BeanSerializerFactory;
import org.apache.axis.encoding.ser.BeanDeserializerFactory;
import org.apache.axis.encoding.ser.ArraySerializerFactory;
import org.apache.axis.encoding.ser.ArrayDeserializerFactory;
import content.OnMobileResultSet;

public class DBManager 
{
	private static final String CLASS_NAME = "DBManager";
	//pratiksha: have to obtain endpoint from SPInteractor in DBUtils.java
	//use the following endpoint while going via tcpMon to connect to Axis
	private String endpoint = "http://127.0.0.1:1234/DBAccess/servlet/AxisServlet";;
	//private String endpoint = "http://172.16.27.23:8010/DBAccess/servlet/AxisServlet";;
	private Service  service ;
	
	private String cdNameSpc = "BeanOnMobileResultSet";
	private Class cdClass = OnMobileResultSet.class;
	private String cdClassName = "OnMobileResultSet";

	private String caNameSpc = "BeanOnMobileResultSet";
	private Class caClass = Object[][].cl

Regarding Axis serialization of "user-defined object containing array of objects"

2008-01-28 Thread Pratiksha Powar
Hi Everybody,

I'm trying to return a user-defined object which contains two primitives
namely : int and Java String and a 2D array of objects of
type :java.lang.Object
Can you tell how should I map these objects in the server-config.wsdd
file so that axis produces the correct wsdl ?
I'm attaching my copy of server-config.wsdd.
Also is it possible to write your own wsdl and make axis point to it?

Thanks,
Pratiksha



server-config.wsdd
Description: XML document


==
DISCLAIMER: The information in this message is confidential and may be legally 
privileged. It is intended solely for the addressee. Access to this message by 
anyone else is unauthorized. If you are not the intended recipient, any 
disclosure, copying, or distribution of the message, or any action or omission 
taken by you in reliance on it, is prohibited and may be unlawful. Please 
immediately contact the sender if you have received this message in error. 
Further, this e-mail may contain viruses and all reasonable precaution to 
minimize the risk arising there from is taken by OnMobile. OnMobile is not 
liable for any damage sustained by you as a result of any virus in this e-mail. 
All applicable virus checks should be carried out by you before opening this 
e-mail or any attachment thereto. 
Thank you - OnMobile Global Limited.
==

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

AW: AW: [Axis2] Converting an OMElement into an Array of Objects

2007-01-16 Thread Sven Schroebler
Hi Ahmet!

After a good bit of work, I finally managed to solve the problem for me.
The reason that I needed to deal with an OMElement was that I tried to
transfer (Array-)Lists via Axis. At first, Axis Java2WSDL-Tool generated
-Elements into the schema to represent the lists to be
transferred in the WSDL-File. anyType doesn't specify "any" specific data
type, therefore the server/client-code generated by WSDL2Java only contains
the most general type OMElement (using ADB-data binding) or XMLObject (using
XMLBeans).

I solved the problem by only transferring Arrays of Objects.
So in case you are also trying to transfer lists at any stage, change them
to arrays of the desired type. The Java2WSDL-Tool will than generate
XML-Schema with the specified data types. 

If you need to resize arrays, you can easily find methods that provide this
functionality on the internet.

By the way: I started with ADB databinding and switched to XMLBeans, as it
provides full XML-Schema support - according to the release notes. 
(Remember that with XMLBeans you fill an XMLBeans-Object-Array like this: 1.
O[] x=new O[length] 2. Each object in x: O y = O.factory.newInstance(). 3.
O[i]=y )

I hope this helps!
Best Regards,
Sven


-Ursprüngliche Nachricht-
Von: Ahmet Koc [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 16. Januar 2007 17:28
An: axis-user@ws.apache.org
Betreff: Re: AW: [Axis2] Converting an OMElement into an Array of Objects

Hello Sven,

i have the same problem. Have you an idea how to convert an omelement to 
an array?

cheers
ahmet

> Hi all,
>
> on the *client* side, the following exception is thrown:
>
> Exception in thread "main" _java.lang.NullPointerException_
>
> at herbieclient.test.holeBenutzer(_test.java:73_)
>
> at herbieclient.test.main(_test.java:28_)
>
> Line 73: System.out.println(buddies1.getName());
>
> On the server side no exception is thrown.
>
> Now, in order to understand the problem I have added the following 
> code in the server class right after the server code described in my 
> first mail:
>
> //Setting the OMElement in the UserDesktopBean
>
> bean.setBuddies(omElementBUD);
>
> *new:*
>
> HerbieObjectDesktopBean[] budtest = (HerbieObjectDesktopBean[]) 
> BeanUtil.deserialize(omElementBUD, new 
> Object[]{HerbieObjectDesktopBean.class},new 
> AxisService().getObjectSupplier());
>
> System.out.println(budtest.length);
>
> Now, the following exception is thrown on the *server* side:
>
> java.lang.ClassCastException: 
> org.apache.axiom.om.impl.llom.OMDocumentImpl at 
> org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:423)
>
> at herbie.core.desktop.handler.UserHandler.get(UserHandler.java:255)
>
> at 
>
herbie.core.desktop.handler.HerbieWSSkeleton.UserGet(HerbieWSSkeleton.java:8
6)
>
> at 
>
herbie.core.desktop.handler.HerbieWSMessageReceiverInOut.invokeBusinessLogic
(HerbieWSMessageReceiverInOut.java:74)
>
> at 
>
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(Abstract
InOutSyncMessageReceiver.java:39)
>
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:493)
>
> at 
>
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HT
TPTransportUtils.java:319)
>
> at 
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:247)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> at 
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)
>
> at 
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
>
> at herbie.core.gui.filter.CharsetFilter.doFilter(CharsetFilter.java:27)
>
> at 
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
>
> at 
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
>
> at 
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:213)
>
> at 
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:178)
>
> at 
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
)
>
> at 
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
)
>
> at 
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:107)
>
> at 
>
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>
> at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
>
> at 
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:744)
>
&

Re: AW: [Axis2] Converting an OMElement into an Array of Objects

2007-01-16 Thread Ahmet Koc

Hello Sven,

i have the same problem. Have you an idea how to convert an omelement to 
an array?


cheers
ahmet


Hi all,

on the *client* side, the following exception is thrown:

Exception in thread "main" _java.lang.NullPointerException_

at herbieclient.test.holeBenutzer(_test.java:73_)

at herbieclient.test.main(_test.java:28_)

Line 73: System.out.println(buddies1.getName());

On the server side no exception is thrown.

Now, in order to understand the problem I have added the following 
code in the server class right after the server code described in my 
first mail:


//Setting the OMElement in the UserDesktopBean

bean.setBuddies(omElementBUD);

*new:*

HerbieObjectDesktopBean[] budtest = (HerbieObjectDesktopBean[]) 
BeanUtil.deserialize(omElementBUD, new 
Object[]{HerbieObjectDesktopBean.class},new 
AxisService().getObjectSupplier());


System.out.println(budtest.length);

Now, the following exception is thrown on the *server* side:

java.lang.ClassCastException: 
org.apache.axiom.om.impl.llom.OMDocumentImpl at 
org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:423)


at herbie.core.desktop.handler.UserHandler.get(UserHandler.java:255)

at 
herbie.core.desktop.handler.HerbieWSSkeleton.UserGet(HerbieWSSkeleton.java:86)


at 
herbie.core.desktop.handler.HerbieWSMessageReceiverInOut.invokeBusinessLogic(HerbieWSMessageReceiverInOut.java:74)


at 
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:39)


at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:493)

at 
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:319)


at 
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:247)


at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)


at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)


at herbie.core.gui.filter.CharsetFilter.doFilter(CharsetFilter.java:27)

at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)


at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)


at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)


at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)


at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)


at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)


at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)


at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)


at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)


at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)


at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)


at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)


at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)


at java.lang.Thread.run(Thread.java:595)

Regards,

Sven



*Von:* Yadav, Yogendra (IT) [mailto:[EMAIL PROTECTED]
*Gesendet:* Dienstag, 9. Januar 2007 18:16
*An:* axis-user@ws.apache.org
*Betreff:* RE: [Axis2] Converting an OMElement into an Array of Objects

what is the exception ?



*From:* Sven Schroebler [mailto:[EMAIL PROTECTED]
*Sent:* Tuesday, January 09, 2007 12:04 PM
*To:* axis-user@ws.apache.org
*Subject:* [Axis2] Converting an OMElement into an Array of Objects

Hi All,

I am quite new to Axis2 and I am trying to develop a webservice for an 
existing webapplication.


So far I managed to set up a basic webservice that transfers JavaBeans 
(e.g. “UserDesktopBean”) and it possible to access all of the simple 
data types from the client application. Unfortunately, even after 
reading multiple AXIOM tutorials, I don’t know how to correctly work 
with the JavaBeans nested inside the “UserDesktopBeans” that need to 
be transferred as via AXIOM OMElement-wrapping.


At this time I use the following code to return an array of Objects as 
an OMElement:


SERVER:

###

//Converting an ArrayList to Array

Object[] budlist = buddies.toArray();

QName budQName = new 
QName("http://desktop.core.herbie.buddies","buddies";);


OMElement omElementBUD = BeanUtil.getOMElement(budQName, budlist, 
null, false, null);


//Setting the OMElement in the UserDesktopBean

bean.setBuddies(omElementBUD);

CLIENT:



//here I am tryi

AW: [Axis2] Converting an OMElement into an Array of Objects

2007-01-10 Thread Sven Schroebler
Hi all,

 

on the client side, the following exception is thrown:

 

Exception in thread "main" java.lang.NullPointerException

  at herbieclient.test.holeBenutzer(test.java:73)

  at herbieclient.test.main(test.java:28)

 

Line 73: System.out.println(buddies1.getName());

On the server side no exception is thrown.

 

Now, in order to understand the problem I have added the following code in
the server class right after the server code described in my first mail:

//Setting the OMElement in the UserDesktopBean

bean.setBuddies(omElementBUD);

 

new:

HerbieObjectDesktopBean[] budtest = (HerbieObjectDesktopBean[])
BeanUtil.deserialize(omElementBUD, new
Object[]{HerbieObjectDesktopBean.class},new
AxisService().getObjectSupplier());

System.out.println(budtest.length);

 

Now, the following exception is thrown on the server side:

 

java.lang.ClassCastException: org.apache.axiom.om.impl.llom.OMDocumentImpl
at
org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:423)

at herbie.core.desktop.handler.UserHandler.get(UserHandler.java:255)

at
herbie.core.desktop.handler.HerbieWSSkeleton.UserGet(HerbieWSSkeleton.java:8
6)

at
herbie.core.desktop.handler.HerbieWSMessageReceiverInOut.invokeBusinessLogic
(HerbieWSMessageReceiverInOut.java:74)

at
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(Abstract
InOutSyncMessageReceiver.java:39)

at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:493)

at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HT
TPTransportUtils.java:319)

at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:247)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)

at
herbie.core.gui.filter.CharsetFilter.doFilter(CharsetFilter.java:27)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)

at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:213)

at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:178)

at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
)

at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
)

at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:107)

at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)

at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:744)

at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)

at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
rkerThread.java:80)

at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:684)

at java.lang.Thread.run(Thread.java:595)

 

Regards,

Sven

 

  _  

Von: Yadav, Yogendra (IT) [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 9. Januar 2007 18:16
An: axis-user@ws.apache.org
Betreff: RE: [Axis2] Converting an OMElement into an Array of Objects

 

what is the exception ?

 

  _  

From: Sven Schroebler [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 09, 2007 12:04 PM
To: axis-user@ws.apache.org
Subject: [Axis2] Converting an OMElement into an Array of Objects

Hi All,

 

I am quite new to Axis2 and I am trying to develop a webservice for an
existing webapplication.

So far I managed to set up a basic webservice that transfers JavaBeans (e.g.
"UserDesktopBean") and it possible to access all of the simple data types
from the client application. Unfortunately, even after reading multiple
AXIOM tutorials, I don't know how to correctly work with the JavaBeans
nested inside the "UserDesktopBeans" that need to be transferred as via
AXIOM OMElement-wrapping.

 

 

At this time I use the following code to return an array of Objects as an
OMElement:

SERVER:

###

//Converting an ArrayList to Array

Object[] budlist = buddies.toArray();

 

QName budQName = new QName("http://desktop.core.herbie.buddies","buddies";);

OMElement omElementBUD = BeanUtil.getOMElement(budQName, budlist, null,
false, null);

 

//Setting the OMElement in the UserDesktopBean

bean.setBuddies(omElementBUD);

 

 

CLIENT:



//here I am 

RE: [Axis2] Converting an OMElement into an Array of Objects

2007-01-09 Thread Yadav, Yogendra \(IT\)
what is the exception ?



From: Sven Schroebler [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 09, 2007 12:04 PM
To: axis-user@ws.apache.org
Subject: [Axis2] Converting an OMElement into an Array of Objects



Hi All,

 

I am quite new to Axis2 and I am trying to develop a webservice for an
existing webapplication.

So far I managed to set up a basic webservice that transfers JavaBeans
(e.g. "UserDesktopBean") and it possible to access all of the simple
data types from the client application. Unfortunately, even after
reading multiple AXIOM tutorials, I don't know how to correctly work
with the JavaBeans nested inside the "UserDesktopBeans" that need to be
transferred as via AXIOM OMElement-wrapping.

 

 

At this time I use the following code to return an array of Objects as
an OMElement:

SERVER:

###

//Converting an ArrayList to Array

Object[] budlist = buddies.toArray();

 

QName budQName = new
QName("http://desktop.core.herbie.buddies","buddies";);

OMElement omElementBUD = BeanUtil.getOMElement(budQName, budlist, null,
false, null);

 

//Setting the OMElement in the UserDesktopBean

bean.setBuddies(omElementBUD);

 

 

CLIENT:



//here I am trying to transform the array back 

OMElement _buddies = benutzer.getBuddies();

ObjectSupplier os = new AxisService().getObjectSupplier();

Object[] budlist=new
Object[]{HerbieWSStub.HerbieObjectDesktopBean.class};

Object[] buddies = BeanUtil.deserialize(_buddies,budlist,os);

 

//here I am trying to access the first array element

HerbieWSStub.HerbieObjectDesktopBean buddies1 =
(HerbieWSStub.HerbieObjectDesktopBean) buddies[0];

System.out.println(buddies1.getName());

 

Trying to access the array leads to an Exception at this time.

 

 

I would really appreciate, if you could help me with this problem.

 

For a better understanding of the underlying webservice, I've attached
the UserDesktopBean, the WSDL-File and the services.xml

 

Best Regards,
Sven


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.


Re: Exception in Axis while returning an array of objects..

2006-08-22 Thread Martin Gainty



Can we see the generated 
WSDL?M-
*This 
email message and any files transmitted with it contain 
confidentialinformation intended only for the person(s) to whom this email 
message isaddressed.  If you have received this email message in error, 
please notifythe sender immediately by telephone or email and destroy the 
originalmessage without making a copy.  Thank you.
 
 

  I 
  think so. In .net client, it generate stub and proxy clases 
  automatically.Thanks
  2006/8/22, Anne Thomas Manes <[EMAIL PROTECTED]>: 
  Do 
you have the typemapping defined in your client, too?On 8/21/06, 
Srinath K < 
[EMAIL PROTECTED]> wrote:>> Thanks for the 
response, I do have the type-mapping defined, this is my> webservice 
interface>> public HelloBean[] sayHello(String name) throws 
RemoteException >> And excerpt from my 
wsdd>>   
> 
xmlns:ns="http://hellows"> 
qname="ns:ArrayOfHelloBean"> 
type="java: 
myws.HelloBean[]"> 
innerType="cmp-ns:HelloBean" xmlns:cmp-ns="http://hellows"> 
encodingStyle=" 
http://schemas.xmlsoap.org/soap/encoding/">   
/>>> 
> 
languageSpecificType="java:myws.HelloBean 
"/>>>>   
> 
xmlns:ns="http://hellows"> 
qname="ns:HelloBean"> 
type="java:myws.HelloBean 
"> 
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory">> 
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"> 
encodingStyle=" http://schemas.xmlsoaporg/soap/encoding/" 
/>>> Please let know if iam missing anything 
    here>> Thanks,>>>>> 
-Original Message-> From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]]> Sent: Monday, 
August 21, 2006 8:06 PM> To: axis-user@ws.apache.org> 
Subject: Re: Exception in Axis while returning an array of 
objects..>>> You must define a type mapping for 
HelloBean.>> On 8/21/06, Srinath K < [EMAIL PROTECTED]> 
wrote:> >> > Hi All,> >> > I know 
there has been many posts regarding this error> > 
"org.xml.sax.SAXException: No deserializer defined for array type " > 
>> > But I didn't find any workaround approach or something to 
solve this> > issue.> >> > Is this something a 
known limitation or something> >> > How do we solve 
this, please help me.. > >> >> > Thanks in 
advance> >> > -Srinath> >> >> 
> Aug 21, 2006 7:36:41 PM org.apache.axis.client.Call invoke> > 
SEVERE: Exception: > > org.xml.sax.SAXException: No deserializer 
defined for array type> > {http://hellows }HelloBean> 
> at> > 
org.apache.axis.encoding.ser.ArrayDeserializer.onStartElement 
(ArrayDe> > serializer.java:276)> 
> at> > 
org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerIm> 
> pl.java:393)> 
> at> > 
org.apache.axis.encoding.DeserializationContext.startElement 
(Deserial> > izationContext.java:1048)> 
> at> > 
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.ja> 
> va:165)> > 
at> > org.apache.axis.message.MessageElement.publishToHandler 
(MessageElemen> > t.java:1141)> 
> at> > 
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)> 
> at> > 
org.apache.axis.message.RPCElement.getParams (RPCElement.java:384)> 
> at 
org.apache.axis.client.Call.invoke(Call.java:2525)> 
> at 
org.apache.axis.client.Call.invoke(Call.java:2424)> 
> at 
org.apache.axis.client.Call.invoke (Call.java:1835)> 
> at 
HelloWSClient.main(HelloWSClient.java:38)> > Exception in thread 
"main" AxisFault> >  faultCode:> > { 
http://schemas.xmlsoap.org/soap/envelope/}Server.userException> 
>  faultSubcode:> >  faultString: 
org.xml.sax.SAXException: No deserializer defined for> > array 
type {> > http://hellows}HelloBean> 
>  faultActor:> >  faultNode:> 
>> >> > The information contained in, or attached to, 
this e-mail, contains> > confidential information and is intended 
solely for the use of the > > individual or entity to whom they 
 

RE: Exception in Axis while returning an array of objects..

2006-08-22 Thread Srinath K
Title: Message



yes myws is my
package

  
  -Original Message-From: Martin Gainty
  [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 22, 2006 6:05
  PMTo: axis-user@ws.apache.orgSubject: Re: Exception in
  Axis while returning an array of objects..
  myws is your package?
  *This
  email message and any files transmitted with it contain
  confidentialinformation intended only for the person(s) to whom this email
  message isaddressed.  If you have received this email message in
  error, please notifythe sender immediately by telephone or email and
  destroy the originalmessage without making a copy.  Thank you.
   
   
  
- Original Message - 
From:
HHDirecto.Net 
To: axis-user@ws.apache.org 
Sent: Tuesday, August 22, 2006 8:12
AM
Subject: Re: Exception in Axis while
returning an array of objects..
I think so. In ..net client, it
generate stub and proxy clases automatically.Thanks
2006/8/22, Anne Thomas Manes <[EMAIL PROTECTED]>:
Do
  you have the typemapping defined in your client, too?On 8/21/06,
  Srinath K <
  [EMAIL PROTECTED]> wrote:>> Thanks for the
  response, I do have the type-mapping defined, this is my>
  webservice interface>> public HelloBean[] sayHello(String
  name) throws RemoteException >> And excerpt from my
  wsdd>>  
  >
  xmlns:ns="http://hellows">
  qname="ns:ArrayOfHelloBean">
  type="java:
  myws.HelloBean[]">
  innerType="cmp-ns:HelloBean" xmlns:cmp-ns="http://hellows">
  encodingStyle="
  http://schemas.xmlsoap.org/soap/encoding/">  
  />>>
  >
  languageSpecificType="java:myws.HelloBean
  "/>>>>  
  >
  xmlns:ns="http://hellows">
  qname="ns:HelloBean">
  type="java:myws.HelloBean
  ">
  serializer="org.apache.axis.encoding.ser.BeanSerializerFactory">>
  deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory">
  encodingStyle=" http://schemas.xmlsoaporg/soap/encoding/"
  />>> Please let know if iam missing anything
  here>> Thanks,>>>>>
  -Original Message-> From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]]> Sent:
  Monday, August 21, 2006 8:06 PM> To: axis-user@ws.apache.org>
  Subject: Re: Exception in Axis while returning an array of
  objects..>>> You must define a type mapping for
  HelloBean.>> On 8/21/06, Srinath K < [EMAIL PROTECTED]>
  wrote:> >> > Hi All,> >> > I know
  there has been many posts regarding this error> >
  "org.xml.sax.SAXException: No deserializer defined for array type "
  > >> > But I didn't find any workaround approach or
  something to solve this> > issue.> >> > Is
  this something a known limitation or something> >> >
  How do we solve this, please help me.. > >> >>
  > Thanks in advance> >> > -Srinath>
  >> >> > Aug 21, 2006 7:36:41 PM
  org.apache.axis.client.Call invoke> > SEVERE: Exception:
  > > org.xml.sax.SAXException: No deserializer defined for array
  type> > {http://hellows
  }HelloBean> >
  at> >
  org.apache.axis.encoding.ser.ArrayDeserializer.onStartElement
  (ArrayDe> > serializer.java:276)>
  > at> >
  org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerIm>
  > pl.java:393)>
  > at> >
  org.apache.axis.encoding.DeserializationContext.startElement
  (Deserial> > izationContext.java:1048)>
  > at> >
  org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.ja>
  > va:165)> >
  at> > org.apache.axis.message.MessageElement.publishToHandler
  (MessageElemen> > t.java:1141)>
  > at> >
  org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)>
  > at> >
  org.apache.axis.message.RPCElement.getParams (RPCElement.java:384)>
  > at
  org.apache.axis.client.Call.invoke(Call.java:2525)>
  > at
  org.apache.axis.client.Call.invoke(Call.java:2424)>
  > at
  org.apache.axis.client.Call.invoke (Call.java:1835)>
  > at
  H

Re: Exception in Axis while returning an array of objects..

2006-08-22 Thread Martin Gainty



myws is your package?
*This 
email message and any files transmitted with it contain 
confidentialinformation intended only for the person(s) to whom this email 
message isaddressed.  If you have received this email message in error, 
please notifythe sender immediately by telephone or email and destroy the 
originalmessage without making a copy.  Thank you.
 
 

  - Original Message - 
  From: 
  HHDirecto.Net 
  To: axis-user@ws.apache.org 
  Sent: Tuesday, August 22, 2006 8:12 
  AM
  Subject: Re: Exception in Axis while 
  returning an array of objects..
  I think so. In .net client, it 
  generate stub and proxy clases automatically.Thanks
  2006/8/22, Anne Thomas Manes <[EMAIL PROTECTED]>: 
  Do 
you have the typemapping defined in your client, too?On 8/21/06, 
Srinath K < 
[EMAIL PROTECTED]> wrote:>> Thanks for the 
response, I do have the type-mapping defined, this is my> webservice 
interface>> public HelloBean[] sayHello(String name) throws 
RemoteException >> And excerpt from my 
wsdd>>   
> 
xmlns:ns="http://hellows"> 
qname="ns:ArrayOfHelloBean"> 
type="java: 
myws.HelloBean[]"> 
innerType="cmp-ns:HelloBean" xmlns:cmp-ns="http://hellows"> 
encodingStyle=" 
http://schemas.xmlsoap.org/soap/encoding/">   
/>>> 
> 
languageSpecificType="java:myws.HelloBean 
"/>>>>   
> 
xmlns:ns="http://hellows"> 
qname="ns:HelloBean"> 
type="java:myws.HelloBean 
"> 
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory">> 
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"> 
encodingStyle=" http://schemas.xmlsoaporg/soap/encoding/" 
/>>> Please let know if iam missing anything 
    here>> Thanks,>>>>> 
-Original Message-> From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]]> Sent: Monday, 
August 21, 2006 8:06 PM> To: axis-user@ws.apache.org> 
Subject: Re: Exception in Axis while returning an array of 
objects..>>> You must define a type mapping for 
HelloBean.>> On 8/21/06, Srinath K < [EMAIL PROTECTED]> 
wrote:> >> > Hi All,> >> > I know 
there has been many posts regarding this error> > 
"org.xml.sax.SAXException: No deserializer defined for array type " > 
>> > But I didn't find any workaround approach or something to 
solve this> > issue.> >> > Is this something a 
known limitation or something> >> > How do we solve 
this, please help me.. > >> >> > Thanks in 
advance> >> > -Srinath> >> >> 
> Aug 21, 2006 7:36:41 PM org.apache.axis.client.Call invoke> > 
SEVERE: Exception: > > org.xml.sax.SAXException: No deserializer 
defined for array type> > {http://hellows }HelloBean> 
> at> > 
org.apache.axis.encoding.ser.ArrayDeserializer.onStartElement 
(ArrayDe> > serializer.java:276)> 
> at> > 
org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerIm> 
> pl.java:393)> 
> at> > 
org.apache.axis.encoding.DeserializationContext.startElement 
(Deserial> > izationContext.java:1048)> 
> at> > 
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.ja> 
> va:165)> > 
at> > org.apache.axis.message.MessageElement.publishToHandler 
(MessageElemen> > t.java:1141)> 
> at> > 
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)> 
> at> > 
org.apache.axis.message.RPCElement.getParams (RPCElement.java:384)> 
> at 
org.apache.axis.client.Call.invoke(Call.java:2525)> 
> at 
org.apache.axis.client.Call.invoke(Call.java:2424)> 
> at 
org.apache.axis.client.Call.invoke (Call.java:1835)> 
> at 
HelloWSClient.main(HelloWSClient.java:38)> > Exception in thread 
"main" AxisFault> >  faultCode:> > { 
http://schemas.xmlsoap.org/soap/envelope/}Server.userException> 
>  faultSubcode:> >  faultString: 
org.xml.sax.SAXException: No deserializer defined for> > array 
type {> > http://hellows}HelloBean> 
>  faultActor:> >  faultNode:> 
>> >> >

Re: Exception in Axis while returning an array of objects..

2006-08-22 Thread HHDirecto . Net
I think so. In .net client, it generate stub and proxy clases automatically.Thanks2006/8/22, Anne Thomas Manes <[EMAIL PROTECTED]>:
Do you have the typemapping defined in your client, too?On 8/21/06, Srinath K <
[EMAIL PROTECTED]> wrote:>> Thanks for the response, I do have the type-mapping defined, this is my> webservice interface>> public HelloBean[] sayHello(String name) throws RemoteException
>> And excerpt from my wsdd>>   > xmlns:ns="http://hellows"> qname="ns:ArrayOfHelloBean"> type="java:
myws.HelloBean[]"> innerType="cmp-ns:HelloBean" xmlns:cmp-ns="http://hellows"> encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/">   />>> > languageSpecificType="java:myws.HelloBean
"/>>>>   > xmlns:ns="http://hellows"> qname="ns:HelloBean"> type="java:myws.HelloBean
"> serializer="org.apache.axis.encoding.ser.BeanSerializerFactory">> deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"> encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" />>> Please let know if iam missing anything here>> Thanks,>>>
>> -Original Message-> From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]]> Sent: Monday, August 21, 2006 8:06 PM> To: 
axis-user@ws.apache.org> Subject: Re: Exception in Axis while returning an array of objects..>>> You must define a type mapping for HelloBean.>> On 8/21/06, Srinath K <
[EMAIL PROTECTED]> wrote:> >> > Hi All,> >> > I know there has been many posts regarding this error> > "org.xml.sax.SAXException: No deserializer defined for array type "
> >> > But I didn't find any workaround approach or something to solve this> > issue.> >> > Is this something a known limitation or something> >> > How do we solve this, please help me..
> >> >> > Thanks in advance> >> > -Srinath> >> >> > Aug 21, 2006 7:36:41 PM org.apache.axis.client.Call invoke> > SEVERE: Exception:
> > org.xml.sax.SAXException: No deserializer defined for array type> > {http://hellows }HelloBean> > at> > org.apache.axis.encoding.ser.ArrayDeserializer.onStartElement
(ArrayDe> > serializer.java:276)> > at> > org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerIm> > pl.java:393)> > at> > org.apache.axis.encoding.DeserializationContext.startElement
(Deserial> > izationContext.java:1048)> > at> > org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.ja> > va:165)> > at> > org.apache.axis.message.MessageElement.publishToHandler
(MessageElemen> > t.java:1141)> > at> > org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)> > at> > org.apache.axis.message.RPCElement.getParams
(RPCElement.java:384)> > at org.apache.axis.client.Call.invoke(Call.java:2525)> > at org.apache.axis.client.Call.invoke(Call.java:2424)> > at org.apache.axis.client.Call.invoke
(Call.java:1835)> > at HelloWSClient.main(HelloWSClient.java:38)> > Exception in thread "main" AxisFault> >  faultCode:> > {
http://schemas.xmlsoap.org/soap/envelope/}Server.userException> >  faultSubcode:> >  faultString: org.xml.sax.SAXException: No deserializer defined for> > array type {> > 
http://hellows}HelloBean> >  faultActor:> >  faultNode:> >> >> > The information contained in, or attached to, this e-mail, contains> > confidential information and is intended solely for the use of the
> > individual or entity to whom they are addressed and is subject to> > legal privilege. If you have received this e-mail in error you should> > notify the sender immediately by reply e-mail, delete the message from
>> > your system and notify your system manager. Please do not copy it for> > any purpose, or disclose its contents to any other person. The views> > or opinions presented in this e-mail are solely those of the author
> > and do not necessarily represent those of the company. The recipient> > should check this e-mail and any attachments for the presence of> > viruses. The company accepts no liability for any damage caused,
> > directly or indirectly, by any virus transmitted in this email.> >> > www.aztecsoft.com> >> > -
&

Re: Exception in Axis while returning an array of objects..

2006-08-22 Thread Anne Thomas Manes

Do you have the typemapping defined in your client, too?

On 8/21/06, Srinath K <[EMAIL PROTECTED]> wrote:


Thanks for the response, I do have the type-mapping defined, this is my
webservice interface

public HelloBean[] sayHello(String name) throws RemoteException

And excerpt from my wsdd

  http://hellows";
qname="ns:ArrayOfHelloBean"
type="java:myws.HelloBean[]"
innerType="cmp-ns:HelloBean" xmlns:cmp-ns="http://hellows";
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
  />




  http://hellows";
qname="ns:HelloBean"
type="java:myws.HelloBean"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"

deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; />

Please let know if iam missing anything here

Thanks,




-Original Message-
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]
Sent: Monday, August 21, 2006 8:06 PM
To: axis-user@ws.apache.org
Subject: Re: Exception in Axis while returning an array of objects..


You must define a type mapping for HelloBean.

On 8/21/06, Srinath K <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> I know there has been many posts regarding this error
> "org.xml.sax.SAXException: No deserializer defined for array type "
>
> But I didn't find any workaround approach or something to solve this
> issue.
>
> Is this something a known limitation or something
>
> How do we solve this, please help me..
>
>
> Thanks in advance
>
> -Srinath
>
>
> Aug 21, 2006 7:36:41 PM org.apache.axis.client.Call invoke
> SEVERE: Exception:
> org.xml.sax.SAXException: No deserializer defined for array type
> {http://hellows }HelloBean
> at
> org.apache.axis.encoding.ser.ArrayDeserializer.onStartElement(ArrayDe
> serializer.java:276)
> at
> org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerIm
> pl.java:393)
> at
> org.apache.axis.encoding.DeserializationContext.startElement(Deserial
> izationContext.java:1048)
> at
> org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.ja
> va:165)
> at
> org.apache.axis.message.MessageElement.publishToHandler(MessageElemen
> t.java:1141)
> at
> org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
> at
> org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
> at org.apache.axis.client.Call.invoke(Call.java:2525)
> at org.apache.axis.client.Call.invoke(Call.java:2424)
> at org.apache.axis.client.Call.invoke(Call.java:1835)
> at HelloWSClient.main(HelloWSClient.java:38)
> Exception in thread "main" AxisFault
>  faultCode:
> {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
>  faultSubcode:
>  faultString: org.xml.sax.SAXException: No deserializer defined for
> array type {
> http://hellows}HelloBean
>  faultActor:
>  faultNode:
>
>
> The information contained in, or attached to, this e-mail, contains
> confidential information and is intended solely for the use of the
> individual or entity to whom they are addressed and is subject to
> legal privilege. If you have received this e-mail in error you should
> notify the sender immediately by reply e-mail, delete the message from

> your system and notify your system manager. Please do not copy it for
> any purpose, or disclose its contents to any other person. The views
> or opinions presented in this e-mail are solely those of the author
> and do not necessarily represent those of the company. The recipient
> should check this e-mail and any attachments for the presence of
> viruses. The company accepts no liability for any damage caused,
> directly or indirectly, by any virus transmitted in this email.
>
> www.aztecsoft.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



The information contained in, or attached to, this e-mail, contains 
confidential information and is intended solely for the use of the individual 
or entity to whom they are addressed and is subject to legal privilege. If you 
have received this e-mail in error you should notify the sender immediately by 
reply e-mail, delete the message from your system and notify your system 
manager. Please do not copy it for any purpose, or dis

RE: Exception in Axis while returning an array of objects..

2006-08-21 Thread Srinath K

Thanks for the response, I do have the type-mapping defined, this is my
webservice interface

public HelloBean[] sayHello(String name) throws RemoteException

And excerpt from my wsdd

  http://hellows";
qname="ns:ArrayOfHelloBean"
type="java:myws.HelloBean[]"
innerType="cmp-ns:HelloBean" xmlns:cmp-ns="http://hellows";
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
  />
 

   
   
  http://hellows";
qname="ns:HelloBean"
type="java:myws.HelloBean"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"

deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; />

Please let know if iam missing anything here

Thanks,




-Original Message-
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]
Sent: Monday, August 21, 2006 8:06 PM
To: axis-user@ws.apache.org
Subject: Re: Exception in Axis while returning an array of objects..


You must define a type mapping for HelloBean.

On 8/21/06, Srinath K <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> I know there has been many posts regarding this error
> "org.xml.sax.SAXException: No deserializer defined for array type "
>
> But I didn't find any workaround approach or something to solve this
> issue.
>
> Is this something a known limitation or something
>
> How do we solve this, please help me..
>
>
> Thanks in advance
>
> -Srinath
>
>
> Aug 21, 2006 7:36:41 PM org.apache.axis.client.Call invoke
> SEVERE: Exception:
> org.xml.sax.SAXException: No deserializer defined for array type
> {http://hellows }HelloBean
> at
> org.apache.axis.encoding.ser.ArrayDeserializer.onStartElement(ArrayDe
> serializer.java:276)
> at
> org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerIm
> pl.java:393)
> at
> org.apache.axis.encoding.DeserializationContext.startElement(Deserial
> izationContext.java:1048)
> at
> org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.ja
> va:165)
> at
> org.apache.axis.message.MessageElement.publishToHandler(MessageElemen
> t.java:1141)
> at
> org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
> at
> org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
> at org.apache.axis.client.Call.invoke(Call.java:2525)
> at org.apache.axis.client.Call.invoke(Call.java:2424)
> at org.apache.axis.client.Call.invoke(Call.java:1835)
> at HelloWSClient.main(HelloWSClient.java:38)
> Exception in thread "main" AxisFault
>  faultCode:
> {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
>  faultSubcode:
>  faultString: org.xml.sax.SAXException: No deserializer defined for
> array type {
> http://hellows}HelloBean
>  faultActor:
>  faultNode:
>
>
> The information contained in, or attached to, this e-mail, contains
> confidential information and is intended solely for the use of the
> individual or entity to whom they are addressed and is subject to
> legal privilege. If you have received this e-mail in error you should
> notify the sender immediately by reply e-mail, delete the message from

> your system and notify your system manager. Please do not copy it for
> any purpose, or disclose its contents to any other person. The views
> or opinions presented in this e-mail are solely those of the author
> and do not necessarily represent those of the company. The recipient
> should check this e-mail and any attachments for the presence of
> viruses. The company accepts no liability for any damage caused,
> directly or indirectly, by any virus transmitted in this email.
>
> www.aztecsoft.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



The information contained in, or attached to, this e-mail, contains 
confidential information and is intended solely for the use of the individual 
or entity to whom they are addressed and is subject to legal privilege. If you 
have received this e-mail in error you should notify the sender immediately by 
reply e-mail, delete the message from your system and notify your system 
manager. Please do not copy it for any purpose, or disclose its contents to any 
other person. The views or opinions presented in this e-mail are solely those 
of the author 

Re: Exception in Axis while returning an array of objects..

2006-08-21 Thread Anne Thomas Manes

You must define a type mapping for HelloBean.

On 8/21/06, Srinath K <[EMAIL PROTECTED]> wrote:


Hi All,

I know there has been many posts regarding this error
"org.xml.sax.SAXException: No deserializer defined for array type "

But I didn't find any workaround approach or something to solve this
issue.

Is this something a known limitation or something

How do we solve this, please help me..


Thanks in advance

-Srinath


Aug 21, 2006 7:36:41 PM org.apache.axis.client.Call invoke
SEVERE: Exception:
org.xml.sax.SAXException: No deserializer defined for array type
{http://hellows
}HelloBean
at
org.apache.axis.encoding.ser.ArrayDeserializer.onStartElement(ArrayDe
serializer.java:276)
at
org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerIm
pl.java:393)
at
org.apache.axis.encoding.DeserializationContext.startElement(Deserial
izationContext.java:1048)
at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.ja
va:165)
at
org.apache.axis.message.MessageElement.publishToHandler(MessageElemen
t.java:1141)
at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at
org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.client.Call.invoke(Call.java:2525)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:1835)
at HelloWSClient.main(HelloWSClient.java:38)
Exception in thread "main" AxisFault
 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: org.xml.sax.SAXException: No deserializer defined for
array type {
http://hellows}HelloBean
 faultActor:
 faultNode:


The information contained in, or attached to, this e-mail, contains 
confidential information and is intended solely for the use of the individual 
or entity to whom they are addressed and is subject to legal privilege. If you 
have received this e-mail in error you should notify the sender immediately by 
reply e-mail, delete the message from your system and notify your system 
manager. Please do not copy it for any purpose, or disclose its contents to any 
other person. The views or opinions presented in this e-mail are solely those 
of the author and do not necessarily represent those of the company. The 
recipient should check this e-mail and any attachments for the presence of 
viruses. The company accepts no liability for any damage caused, directly or 
indirectly, by any virus transmitted in this email.

www.aztecsoft.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Exception in Axis while returning an array of objects..

2006-08-21 Thread Srinath K

Hi All,

I know there has been many posts regarding this error
"org.xml.sax.SAXException: No deserializer defined for array type "

But I didn't find any workaround approach or something to solve this
issue.

Is this something a known limitation or something

How do we solve this, please help me..


Thanks in advance

-Srinath


Aug 21, 2006 7:36:41 PM org.apache.axis.client.Call invoke
SEVERE: Exception:
org.xml.sax.SAXException: No deserializer defined for array type
{http://hellows
}HelloBean
at
org.apache.axis.encoding.ser.ArrayDeserializer.onStartElement(ArrayDe
serializer.java:276)
at
org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerIm
pl.java:393)
at
org.apache.axis.encoding.DeserializationContext.startElement(Deserial
izationContext.java:1048)
at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.ja
va:165)
at
org.apache.axis.message.MessageElement.publishToHandler(MessageElemen
t.java:1141)
at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at
org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.client.Call.invoke(Call.java:2525)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:1835)
at HelloWSClient.main(HelloWSClient.java:38)
Exception in thread "main" AxisFault
 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: org.xml.sax.SAXException: No deserializer defined for
array type {
http://hellows}HelloBean
 faultActor:
 faultNode:


The information contained in, or attached to, this e-mail, contains 
confidential information and is intended solely for the use of the individual 
or entity to whom they are addressed and is subject to legal privilege. If you 
have received this e-mail in error you should notify the sender immediately by 
reply e-mail, delete the message from your system and notify your system 
manager. Please do not copy it for any purpose, or disclose its contents to any 
other person. The views or opinions presented in this e-mail are solely those 
of the author and do not necessarily represent those of the company. The 
recipient should check this e-mail and any attachments for the presence of 
viruses. The company accepts no liability for any damage caused, directly or 
indirectly, by any virus transmitted in this email.

www.aztecsoft.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Axis2: Code Generator BUG? - Create list/Array of objects - IMPORTANT

2006-08-15 Thread Derek
Title: Message



Debasish:
 
Having 
WSDL2Java simply produce incorrect code when errors like this happen is not 
really acceptable. If something is wrong, WSDL2Java should tell the user so, not 
just go blindly forward making unjustified assumptions about what the user 
really meant ("He didn't tell me what he wanted, so he must have just wanted an 
OMElement!") or otherwise trying unsuccessfully to fix the user's 
mistakes.
 

Please 
file a JIRA for this issue, providing your WSDL and schemas, and stating that 
WSDL2Java did not detect that you referenced a nonexistent schema component, and 
did not reject your WSDL by providing a reasonable error message 
telling you of your problem and what to do about it, as it should have. Note 
that this bug seems quite reminiscent of https://issues.apache.org/jira/browse/AXIS2-845, 
and may be related.
 
Thanks.
Derek

  
  -Original Message-From: 
  [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
  Sent: Tuesday, August 15, 2006 10:55 AMTo: 
  axis-user@ws.apache.orgCc: 
  axis-user@ws.apache.orgSubject: Re: Axis2: Code Generator BUG? - 
  Create list/Array of objects - IMPORTANTPerfect!!! Thanks a 
  lot.___Debasish Dutta 
  RoyNITASPh: 617-871-3033 
  


  
  "Anne Thomas Manes" 
<[EMAIL PROTECTED]> 
08/15/2006 01:33 PM Please respond to axis-user 
                  To:     
   axis-user@ws.apache.org         cc:        (bcc: 
Debasish DuttaRoy/X/PH/Novartis)         Subject:       
 Re: Axis2: Code Generator BUG? - Create list/Array of objects - 
IMPORTANTValidation of your WSDL produces this warning:There is no schema component of the name 
  [requestRA] defined in the WSDL either via imported or embedded 
  schema.This error is caused 
  by the definition of the "ralist" element, which is the last child element of 
  the "requestDetails" element. It is defined as:  Two problems:1. you must namespace 
  qualify the referenced type. 2. "requestRA" must be defined as a type 
  rather than an element.The "raList" definition should 
  be: 
  And the "requestRA" 
  definition should be:  
                 ...  
   Anne On 8/15/06, [EMAIL PROTECTED] 
  <[EMAIL PROTECTED]> wrote: Hi Ajith I also believe the same. There is something wrong 
  in the schema part of the wsdl file. I am attaching the wsdl file for your 
  reference. There is a requestDetails object and as a member 
  variable of the request details object I want an array of RequestRA 
  object. At line 84 I have defined the element of raList, 
  which I want as an array/List of RequestRA/Object and then at line 90 is the 
  requestRA definition. 
  Right now the RequestRA class is 
  getting created but inside requestDetails raList is an array of 
  OMElement. ___Debasish 
  Dutta RoyNITASPh: 617-871-3033 
  


  
  "Ajith Ranabahu" 
<[EMAIL PROTECTED] > 
08/15/2006 09:08 AM Please respond to axis-user 
          
       To: 
       axis-user@ws.apache.org        cc:       
 (bcc: Debasish DuttaRoy/X/PH/Novartis)        Subject:       
 Re: Axis2: Code Generator BUG? - Create list/Array of objects - 
IMPORTANTHi,If your 
  schema declaration is proper then it should generate an arrayof the 
  correct type. If you are still seeing OMElements then therecould be a 
  problem with your schemaAjithOn 8/15/06, Debasish Dutta Roy 
  <[EMAIL PROTECTED]> wrote:> I have seen that example on the net. But my 
  list/array is of another object.> Not a native data type.> If I 
  do a complextype then this object is not created.>> I any case, 
  it creates an array of OMElement[] and not an Object[].>> As for 
  creating list vs array, i think it would depend on the tool. If it> can 
  create one you can get a list.>> I am using the nightly build of 
  08/07/2006. Anybody has got any idea???>> It is a simple case, I 
  have a manager Class which has member of array of> Employee objects who 
  are subordinates to him.>> On 8/11/06, Ajith Ranabahu 
  <[EMAIL PROTECTED]> wrote:> > Hi,> > As far as generating code is 
  concerned you *cannot* generate a list> > field, even if you have a 
  the maxOccurs set to unbound! it is always> > an array!> > 
  As for this schema it is not right. What you should be doing is the> 
  following> >> > > >> > 
  > >         
          > >     
                      
  > type="xsd:string"/>> >   
                > 
  > > > > >> >> > Ajith> > On 8/11/06, 
  [EMAIL PROTECTED]> > < [EMAIL PROTECTED]> wrote:> > >> > > 
  All> 

Re: Axis2: Code Generator BUG? - Create list/Array of objects - IMPORTANT

2006-08-15 Thread debasish . duttaroy

Perfect!!!

Thanks a lot.
___
Debasish Dutta Roy
NITAS
Ph: 617-871-3033






"Anne Thomas Manes" <[EMAIL PROTECTED]>
08/15/2006 01:33 PM
Please respond to axis-user

        
        To:        axis-user@ws.apache.org
        cc:        (bcc: Debasish DuttaRoy/X/PH/Novartis)
        Subject:        Re: Axis2: Code Generator BUG? - Create list/Array of objects - IMPORTANT


Validation of your WSDL produces this warning:

There is no schema component of the name [requestRA] defined in the WSDL either via imported or embedded schema.

This error is caused by the definition of the "ralist" element, which is the last child element of the "requestDetails" element. It is defined as: 



Two problems:
1. you must namespace qualify the referenced type. 
2. "requestRA" must be defined as a type rather than an element.

The "raList" definition should be:

 

And the "requestRA" definition should be:


    
        
        ...
    


Anne 

On 8/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Hi Ajith 
I also believe the same. There is something wrong in the schema part of the wsdl file. I am attaching the wsdl file for your reference. 

There is a requestDetails object and as a member variable of the request details object I want an array of RequestRA object. 

At line 84 I have defined the element of raList, which I want as an array/List of RequestRA/Object and then at line 90 is the requestRA definition. 

Right now the RequestRA class is getting created but inside requestDetails raList is an array of OMElement. 



___
Debasish Dutta Roy
NITAS
Ph: 617-871-3033 





"Ajith Ranabahu" <[EMAIL PROTECTED] > 
08/15/2006 09:08 AM 
Please respond to axis-user 
        
        To:        axis-user@ws.apache.org 
        cc:        (bcc: Debasish DuttaRoy/X/PH/Novartis) 
        Subject:        Re: Axis2: Code Generator BUG? - Create list/Array of objects - IMPORTANT



Hi,
If your schema declaration is proper then it should generate an array
of the correct type. If you are still seeing OMElements then there
could be a problem with your schema

Ajith

On 8/15/06, Debasish Dutta Roy <[EMAIL PROTECTED]> wrote:
> I have seen that example on the net. But my list/array is of another object.
> Not a native data type.
> If I do a complextype then this object is not created.
>
> I any case, it creates an array of OMElement[] and not an Object[].
>
> As for creating list vs array, i think it would depend on the tool. If it
> can create one you can get a list.
>
> I am using the nightly build of 08/07/2006. Anybody has got any idea???
>
> It is a simple case, I have a manager Class which has member of array of
> Employee objects who are subordinates to him.
>
> On 8/11/06, Ajith Ranabahu <[EMAIL PROTECTED]> wrote:
> > Hi,
> > As far as generating code is concerned you *cannot* generate a list
> > field, even if you have a the maxOccurs set to unbound! it is always
> > an array!
> > As for this schema it is not right. What you should be doing is the
> following
> >
> > 
> >
> > 
> >                 
> >                         
> type="xsd:string"/>
> >                 
> > 
> >
> >
> >
> > Ajith
> > On 8/11/06, [EMAIL PROTECTED]
> > < [EMAIL PROTECTED]> wrote:
> > >
> > > All
> > > I need an object which contains a member variable, which is list of
> another
> > > object.
> > >
> > > Class A {
> > > //list of object B
> > > private java.util.List bList;
> > > }
> > >
> > > Class B {
> > > private String str;
> > > }
> > >
> > > How do I represent this in WSDL. I am using WSDL2Java commandline. Since
> I
> > > am using the tool I expect to get a java.util.List
> > >
> > > This is how my current wsdl looks...
> > >
> > > 
> > >
> > > 
> > >         
> > >                 
> > >                         
> > >                 
> > >                 
> > > 
> > >
> > > But when I generate the code inside class A, I get
> > >
> > > protected org.apache.axiom.om.OMElement[] localBList ;
> > >
> > > why an array, and why OMElement?
> > >
> > > Can you tell me what I am missing.
> > > ___
> > > Debasish Dutta Roy
> > > NITAS
> > > Ph: 617-871-3033
> > > _
> > >
> > > CONFIDENTIALITY NOTICE
> > &

Re: Axis2: Code Generator BUG? - Create list/Array of objects - IMPORTANT

2006-08-15 Thread Anne Thomas Manes
Validation of your WSDL produces this warning:There is no schema component of the name [requestRA] defined in the WSDL either via imported or embedded schema.This error is caused by the definition of the "ralist" element, which is the last child element of the "requestDetails" element. It is defined as:
Two problems:1. you must namespace qualify the referenced type.
2. "requestRA" must be defined as a type rather than an element.The "raList" definition should be: 
And the "requestRA" definition should be:            
        ...    Anne On 8/15/06, [EMAIL PROTECTED]
 <[EMAIL PROTECTED]> wrote:

Hi Ajith
I also believe the same. There is something wrong in the schema part of the wsdl file. I am attaching the wsdl file for your reference.

There is a requestDetails object and as a member variable of the request details object I want an array of RequestRA object.

At line 84 I have defined the element of raList, which I want as an array/List of RequestRA/Object and then at line 90 is the requestRA definition.

Right now the RequestRA class is getting created but inside requestDetails raList is an array of OMElement.


___
Debasish Dutta Roy
NITAS
Ph: 617-871-3033






"Ajith Ranabahu" <[EMAIL PROTECTED]
>
08/15/2006 09:08 AM
Please respond to axis-user

        
        To:        axis-user@ws.apache.org
        cc:        (bcc: Debasish DuttaRoy/X/PH/Novartis)
        Subject:        Re: Axis2: Code Generator BUG? - Create list/Array of objects - IMPORTANT



Hi,
If your schema declaration is proper then it should generate an array
of the correct type. If you are still seeing OMElements then there
could be a problem with your schema

Ajith

On 8/15/06, Debasish Dutta Roy <[EMAIL PROTECTED]> wrote:
> I have seen that example on the net. But my list/array is of another object.
> Not a native data type.
> If I do a complextype then this object is not created.
>
> I any case, it creates an array of OMElement[] and not an Object[].
>
> As for creating list vs array, i think it would depend on the tool. If it
> can create one you can get a list.
>
> I am using the nightly build of 08/07/2006. Anybody has got any idea???
>
> It is a simple case, I have a manager Class which has member of array of
> Employee objects who are subordinates to him.
>
> On 8/11/06, Ajith Ranabahu <[EMAIL PROTECTED]> wrote:
> > Hi,
> > As far as generating code is concerned you *cannot* generate a list
> > field, even if you have a the maxOccurs set to unbound! it is always
> > an array!
> > As for this schema it is not right. What you should be doing is the
> following
> >
> > 
> >
> > 
> >                 
> >                         
> type="xsd:string"/>
> >                 
> > 
> >
> >
> >
> > Ajith
> > On 8/11/06, [EMAIL PROTECTED]
> > < [EMAIL PROTECTED]> wrote:
> > >
> > > All
> > > I need an object which contains a member variable, which is list of
> another
> > > object.
> > >
> > > Class A {
> > > //list of object B
> > > private java.util.List bList;
> > > }
> > >
> > > Class B {
> > > private String str;
> > > }
> > >
> > > How do I represent this in WSDL. I am using WSDL2Java commandline. Since
> I
> > > am using the tool I expect to get a java.util.List
> > >
> > > This is how my current wsdl looks...
> > >
> > > 
> > >
> > > 
> > >         
> > >                 
> > >                         
> > >                 
> > >                 
> > > 
> > >
> > > But when I generate the code inside class A, I get
> > >
> > > protected org.apache.axiom.om.OMElement[] localBList ;
> > >
> > > why an array, and why OMElement?
> > >
> > > Can you tell me what I am missing.
> > > ___
> > > Debasish Dutta Roy
> > > NITAS
> > > Ph: 617-871-3033
> > > _
> > >
> > > CONFIDENTIALITY NOTICE
> > >
> > > The information contained in this e-mail message is intended only for
> the
> > > exclusive use of the individual or entity named above and may contain
> > > information that is privileged, confidential or exempt from disclosure
> under
> > > applicable law. If the reader of this message is not the intended
> recipient,
> > > or the employee or agent responsible for delivery of the message to the
> > &g

Re: Axis2: Code Generator BUG? - Create list/Array of objects - IMPORTANT

2006-08-15 Thread debasish . duttaroy

Hi Ajith
I also believe the same. There is something wrong in the schema part of the wsdl file. I am attaching the wsdl file for your reference.

There is a requestDetails object and as a member variable of the request details object I want an array of RequestRA object.

At line 84 I have defined the element of raList, which I want as an array/List of RequestRA/Object and then at line 90 is the requestRA definition.

Right now the RequestRA class is getting created but inside requestDetails raList is an array of OMElement.


___
Debasish Dutta Roy
NITAS
Ph: 617-871-3033






"Ajith Ranabahu" <[EMAIL PROTECTED]>
08/15/2006 09:08 AM
Please respond to axis-user

        
        To:        axis-user@ws.apache.org
        cc:        (bcc: Debasish DuttaRoy/X/PH/Novartis)
        Subject:        Re: Axis2: Code Generator BUG? - Create list/Array of objects - IMPORTANT


Hi,
If your schema declaration is proper then it should generate an array
of the correct type. If you are still seeing OMElements then there
could be a problem with your schema

Ajith

On 8/15/06, Debasish Dutta Roy <[EMAIL PROTECTED]> wrote:
> I have seen that example on the net. But my list/array is of another object.
> Not a native data type.
> If I do a complextype then this object is not created.
>
> I any case, it creates an array of OMElement[] and not an Object[].
>
> As for creating list vs array, i think it would depend on the tool. If it
> can create one you can get a list.
>
> I am using the nightly build of 08/07/2006. Anybody has got any idea???
>
> It is a simple case, I have a manager Class which has member of array of
> Employee objects who are subordinates to him.
>
> On 8/11/06, Ajith Ranabahu <[EMAIL PROTECTED]> wrote:
> > Hi,
> > As far as generating code is concerned you *cannot* generate a list
> > field, even if you have a the maxOccurs set to unbound! it is always
> > an array!
> > As for this schema it is not right. What you should be doing is the
> following
> >
> > 
> >
> > 
> >                 
> >                         
> type="xsd:string"/>
> >                 
> > 
> >
> >
> >
> > Ajith
> > On 8/11/06, [EMAIL PROTECTED]
> > < [EMAIL PROTECTED]> wrote:
> > >
> > > All
> > > I need an object which contains a member variable, which is list of
> another
> > > object.
> > >
> > > Class A {
> > > //list of object B
> > > private java.util.List bList;
> > > }
> > >
> > > Class B {
> > > private String str;
> > > }
> > >
> > > How do I represent this in WSDL. I am using WSDL2Java commandline. Since
> I
> > > am using the tool I expect to get a java.util.List
> > >
> > > This is how my current wsdl looks...
> > >
> > > 
> > >
> > > 
> > >         
> > >                 
> > >                         
> > >                 
> > >                 
> > > 
> > >
> > > But when I generate the code inside class A, I get
> > >
> > > protected org.apache.axiom.om.OMElement[] localBList ;
> > >
> > > why an array, and why OMElement?
> > >
> > > Can you tell me what I am missing.
> > > ___
> > > Debasish Dutta Roy
> > > NITAS
> > > Ph: 617-871-3033
> > > _
> > >
> > > CONFIDENTIALITY NOTICE
> > >
> > > The information contained in this e-mail message is intended only for
> the
> > > exclusive use of the individual or entity named above and may contain
> > > information that is privileged, confidential or exempt from disclosure
> under
> > > applicable law. If the reader of this message is not the intended
> recipient,
> > > or the employee or agent responsible for delivery of the message to the
> > > intended recipient, you are hereby notified that any dissemination,
> > > distribution or copying of this communication is strictly prohibited. If
> you
> > > have received this communication in error, please notify the sender
> > > immediately by e-mail and delete the material from any computer.  Thank
> you.
> > >
> >
> >
> > --
> > Ajith Ranabahu
> >
> >
> -
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
&

Re: Axis2: Code Generator BUG? - Create list/Array of objects - IMPORTANT

2006-08-15 Thread Ajith Ranabahu

Hi,
If your schema declaration is proper then it should generate an array
of the correct type. If you are still seeing OMElements then there
could be a problem with your schema

Ajith

On 8/15/06, Debasish Dutta Roy <[EMAIL PROTECTED]> wrote:

I have seen that example on the net. But my list/array is of another object.
Not a native data type.
If I do a complextype then this object is not created.

I any case, it creates an array of OMElement[] and not an Object[].

As for creating list vs array, i think it would depend on the tool. If it
can create one you can get a list.

I am using the nightly build of 08/07/2006. Anybody has got any idea???

It is a simple case, I have a manager Class which has member of array of
Employee objects who are subordinates to him.

On 8/11/06, Ajith Ranabahu <[EMAIL PROTECTED]> wrote:
> Hi,
> As far as generating code is concerned you *cannot* generate a list
> field, even if you have a the maxOccurs set to unbound! it is always
> an array!
> As for this schema it is not right. What you should be doing is the
following
>
> 
>
> 
> 
> 
> 
> 
>
>
>
> Ajith
> On 8/11/06, [EMAIL PROTECTED]
> < [EMAIL PROTECTED]> wrote:
> >
> > All
> > I need an object which contains a member variable, which is list of
another
> > object.
> >
> > Class A {
> > //list of object B
> > private java.util.List bList;
> > }
> >
> > Class B {
> > private String str;
> > }
> >
> > How do I represent this in WSDL. I am using WSDL2Java commandline. Since
I
> > am using the tool I expect to get a java.util.List
> >
> > This is how my current wsdl looks...
> >
> > 
> >
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > But when I generate the code inside class A, I get
> >
> > protected org.apache.axiom.om.OMElement[] localBList ;
> >
> > why an array, and why OMElement?
> >
> > Can you tell me what I am missing.
> > ___
> > Debasish Dutta Roy
> > NITAS
> > Ph: 617-871-3033
> > _
> >
> > CONFIDENTIALITY NOTICE
> >
> > The information contained in this e-mail message is intended only for
the
> > exclusive use of the individual or entity named above and may contain
> > information that is privileged, confidential or exempt from disclosure
under
> > applicable law. If the reader of this message is not the intended
recipient,
> > or the employee or agent responsible for delivery of the message to the
> > intended recipient, you are hereby notified that any dissemination,
> > distribution or copying of this communication is strictly prohibited. If
you
> > have received this communication in error, please notify the sender
> > immediately by e-mail and delete the material from any computer.  Thank
you.
> >
>
>
> --
> Ajith Ranabahu
>
>
-
> To unsubscribe, e-mail:
[EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>





--
Ajith Ranabahu

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Axis2: Code Generator BUG? - Create list/Array of objects - IMPORTANT

2006-08-15 Thread Debasish Dutta Roy
I have seen that example on the net. But my list/array is of another object. Not a native data type.If I do a complextype then this object is not created.I any case, it creates an array of OMElement[] and not an Object[].
As for creating list vs array, i think it would depend on the tool. If it can create one you can get a list.I am using the nightly build of 08/07/2006. Anybody has got any idea???It is a simple case, I have a manager Class which has member of array of Employee objects who are subordinates to him.
On 8/11/06, Ajith Ranabahu <[EMAIL PROTECTED]> wrote:
Hi,As far as generating code is concerned you *cannot* generate a listfield, even if you have a the maxOccurs set to unbound! it is alwaysan array!As for this schema it is not right. What you should be doing is the following

AjithOn 8/11/06, [EMAIL PROTECTED]<
[EMAIL PROTECTED]> wrote:>> All> I need an object which contains a member variable, which is list of another> object.>> Class A {> //list of object B
> private java.util.List bList;> }>> Class B {> private String str;> }>> How do I represent this in WSDL. I am using WSDL2Java commandline. Since I> am using the tool I expect to get a 
java.util.List>> This is how my current wsdl looks...>> >> 
> > > > 
> > >> But when I generate the code inside class A, I get>> protected org.apache.axiom.om.OMElement[] localBList ;>
> why an array, and why OMElement?>> Can you tell me what I am missing.> ___> Debasish Dutta Roy> NITAS> Ph: 617-871-3033
> _>> CONFIDENTIALITY NOTICE>> The information contained in this e-mail message is intended only for the> exclusive use of the individual or entity named above and may contain
> information that is privileged, confidential or exempt from disclosure under> applicable law. If the reader of this message is not the intended recipient,> or the employee or agent responsible for delivery of the message to the
> intended recipient, you are hereby notified that any dissemination,> distribution or copying of this communication is strictly prohibited. If you> have received this communication in error, please notify the sender
> immediately by e-mail and delete the material from any computer.  Thank you.>--Ajith Ranabahu-To unsubscribe, e-mail: 
[EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]



Re: Array of objects

2005-03-15 Thread Elaine Nance
Could be issues related to being in Alaska, or our new, 
"improved" bandwidth filtering.  But I get the same result with 
IE or Firefox.

Maybe some of the local DNS servers don't fully populate? 
Sometimes I can't see my domain, which is hosted in Utah.

Dino Chiesa wrote:
I can't figure out why you'd be having troubles with the link.
It works for me and it is working for other people, too.  I can see in the logs 
that it is succeeding. . . .
Sorry,
-D 

-Original Message-
From: Elaine Nance [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 11:15 AM
To: axis-user@ws.apache.org
Subject: Re: Array of objects

Link reports "Document has no data"
Dino Chiesa wrote:
http://dinoch.dyndns.org:7070/axis1.2/AboutArrays2.jsp
-Original Message-
From: bohldan bohldan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 15, 2005 5:37 AM
To: axis-user@ws.apache.org
Subject: Array of objects
Hi I think ive tried everything and i searched for a while now on how i send an 
array of object. If someone has something that works can that someone be nice 
to give me an example of the client, wsdd file. This is how my code look like..
client
---
String endpointURL = 
"http://localhost:8080/axis/services/GlazeService";;
Service service = new Service();
Call call = (Call) service.createCall();
QName qn = new QName( "urn:GlazeService", "User" );
call.setOperationName("ldap_GetAllUsernames");
call.setTargetEndpointAddress( new 
java.net.URL(endpointURL) );
call.registerTypeMapping( User.class,
qn,
new 
org.apache.axis.encoding.ser.BeanSerializerFactory(User.class, qn),
new
org.apache.axis.encoding.ser.BeanDeserializerFactory(User.class,qn));
User[] tomte = (User[])call.invoke(new Object [] {});
System.out.println("Size: " + tomte.length);
for(int i = 0; i < tomte.length; i++){
System.out.println(tomte[i].getGecos());
}

wsdd file
---
http://xml.apache.org/axis/wsdd/";
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";
xmlns:glaze="urn:GlazeService.Service">




http://schemas.xmlsoap.org/soap/encoding/";
xmlns:glaze="urn:GlazeService"/>
   

_
Hitta rätt på nätet med MSN Sök http://search.msn.se/


--
<~~
  |  Computers are useless. They can only give you answers.
  | --  Pablo Picasso  --
<~~


--
<~~
 |  Computers are useless. They can only give you answers.
 | --  Pablo Picasso  --
<~~




RE: Array of objects

2005-03-15 Thread Dino Chiesa
I can't figure out why you'd be having troubles with the link.
It works for me and it is working for other people, too.  I can see in the logs 
that it is succeeding. . . .

Sorry,

-D 

-Original Message-
From: Elaine Nance [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 11:15 AM
To: axis-user@ws.apache.org
Subject: Re: Array of objects

Link reports "Document has no data"

Dino Chiesa wrote:
> http://dinoch.dyndns.org:7070/axis1.2/AboutArrays2.jsp
> 
> -Original Message-
> From: bohldan bohldan [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 15, 2005 5:37 AM
> To: axis-user@ws.apache.org
> Subject: Array of objects
> 
> Hi I think ive tried everything and i searched for a while now on how i send 
> an array of object. If someone has something that works can that someone be 
> nice to give me an example of the client, wsdd file. This is how my code look 
> like..
> 
> 
> client
> ---
> 
> 
>   String endpointURL = 
> "http://localhost:8080/axis/services/GlazeService";;
>   Service service = new Service();
>   Call call = (Call) service.createCall();
>   QName qn = new QName( "urn:GlazeService", "User" );
>   call.setOperationName("ldap_GetAllUsernames");
>   call.setTargetEndpointAddress( new 
> java.net.URL(endpointURL) );
>   call.registerTypeMapping( User.class,
>   qn,
>   new 
> org.apache.axis.encoding.ser.BeanSerializerFactory(User.class, qn),
>   new
> org.apache.axis.encoding.ser.BeanDeserializerFactory(User.class,qn));
>   User[] tomte = (User[])call.invoke(new Object [] {});
>   System.out.println("Size: " + tomte.length);
>   for(int i = 0; i < tomte.length; i++){
>   System.out.println(tomte[i].getGecos());
>   }
> 
> 
> 
> wsdd file
> ---
> http://xml.apache.org/axis/wsdd/";
>   xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";
>   xmlns:glaze="urn:GlazeService.Service">
>   
>   
>   
>   qname="ns1:User" xmlns:ns1="urn:GlazeService"/>
>  serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
>   deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
>   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
>   xmlns:glaze="urn:GlazeService"/>
> 
> 
> 
> _
> Hitta rätt på nätet med MSN Sök http://search.msn.se/
> 
> 

--
<~~
  |  Computers are useless. They can only give you answers.
  | --  Pablo Picasso  --
<~~






Re: Array of objects

2005-03-15 Thread Elaine Nance
Link reports "Document has no data"
Dino Chiesa wrote:
http://dinoch.dyndns.org:7070/axis1.2/AboutArrays2.jsp 

-Original Message-
From: bohldan bohldan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 5:37 AM
To: axis-user@ws.apache.org
Subject: Array of objects

Hi I think ive tried everything and i searched for a while now on how i send an 
array of object. If someone has something that works can that someone be nice 
to give me an example of the client, wsdd file. This is how my code look like..
client
---
String endpointURL = 
"http://localhost:8080/axis/services/GlazeService";;
Service service = new Service();
Call call = (Call) service.createCall();
QName qn = new QName( "urn:GlazeService", "User" );
call.setOperationName("ldap_GetAllUsernames");
call.setTargetEndpointAddress( new 
java.net.URL(endpointURL) );
call.registerTypeMapping( User.class,
qn,
new 
org.apache.axis.encoding.ser.BeanSerializerFactory(User.class, qn),
new
org.apache.axis.encoding.ser.BeanDeserializerFactory(User.class,qn));
User[] tomte = (User[])call.invoke(new Object [] {});
System.out.println("Size: " + tomte.length);
for(int i = 0; i < tomte.length; i++){
System.out.println(tomte[i].getGecos());
}

wsdd file
---
http://xml.apache.org/axis/wsdd/";
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";
xmlns:glaze="urn:GlazeService.Service">




http://schemas.xmlsoap.org/soap/encoding/";
xmlns:glaze="urn:GlazeService"/>


_
Hitta rätt på nätet med MSN Sök http://search.msn.se/

--
<~~
 |  Computers are useless. They can only give you answers.
 | --  Pablo Picasso  --
<~~




RE: Array of objects

2005-03-15 Thread Dino Chiesa
http://dinoch.dyndns.org:7070/axis1.2/AboutArrays2.jsp 

-Original Message-
From: bohldan bohldan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 5:37 AM
To: axis-user@ws.apache.org
Subject: Array of objects

Hi I think ive tried everything and i searched for a while now on how i send an 
array of object. If someone has something that works can that someone be nice 
to give me an example of the client, wsdd file. This is how my code look like..


client
---


String endpointURL = 
"http://localhost:8080/axis/services/GlazeService";;
Service service = new Service();
Call call = (Call) service.createCall();
QName qn = new QName( "urn:GlazeService", "User" );
call.setOperationName("ldap_GetAllUsernames");
call.setTargetEndpointAddress( new 
java.net.URL(endpointURL) );
call.registerTypeMapping( User.class,
qn,
new 
org.apache.axis.encoding.ser.BeanSerializerFactory(User.class, qn),
new
org.apache.axis.encoding.ser.BeanDeserializerFactory(User.class,qn));
User[] tomte = (User[])call.invoke(new Object [] {});
System.out.println("Size: " + tomte.length);
for(int i = 0; i < tomte.length; i++){
System.out.println(tomte[i].getGecos());
}



wsdd file
---
http://xml.apache.org/axis/wsdd/";
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";
xmlns:glaze="urn:GlazeService.Service">




http://schemas.xmlsoap.org/soap/encoding/";
xmlns:glaze="urn:GlazeService"/>



_
Hitta rätt på nätet med MSN Sök http://search.msn.se/



Array of objects

2005-03-15 Thread bohldan bohldan
Hi I think ive tried everything and i searched for a while now on how i send 
an array of object. If someone has something that works can that someone be 
nice to give me an example of the client, wsdd file. This is how my code 
look like..

client
---
			String endpointURL = "http://localhost:8080/axis/services/GlazeService";;
			Service service = new Service();
			Call call = (Call) service.createCall();
			QName qn = new QName( "urn:GlazeService", "User" );
			call.setOperationName("ldap_GetAllUsernames");
			call.setTargetEndpointAddress( new java.net.URL(endpointURL) );
			call.registerTypeMapping( User.class,
	qn,
	new org.apache.axis.encoding.ser.BeanSerializerFactory(User.class, qn),
	new 
org.apache.axis.encoding.ser.BeanDeserializerFactory(User.class,qn));
		User[] tomte = (User[])call.invoke(new Object [] {});
		System.out.println("Size: " + tomte.length);
		for(int i = 0; i < tomte.length; i++){
			System.out.println(tomte[i].getGecos());
		}


wsdd file
---
http://xml.apache.org/axis/wsdd/";
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";
xmlns:glaze="urn:GlazeService.Service">




http://schemas.xmlsoap.org/soap/encoding/";
xmlns:glaze="urn:GlazeService"/>
   

_
Hitta rätt på nätet med MSN Sök http://search.msn.se/