Re: setParam0(OMElement param) or xs:any

2007-03-07 Thread Kay*

I tried to use BeanUtil's method, but I had an error:

Exception in thread main java.lang.IllegalArgumentException: null rcl
   at org.codehaus.jam.internal.reflect.ReflectClassBuilder.init(
ReflectClassBuilder.java:47)
   at org.codehaus.jam.provider.JamServiceFactoryImpl.createBuilder(
JamServiceFactoryImpl.java:173)
   at org.codehaus.jam.provider.JamServiceFactoryImpl.createClassLoader
(JamServiceFactoryImpl.java:137)
   at org.codehaus.jam.provider.JamServiceFactoryImpl.createService(
JamServiceFactoryImpl.java:78)
   at org.apache.axis2.databinding.utils.BeanUtil.getPullParser(
BeanUtil.java:67)
   at org.apache.axis2.databinding.utils.BeanUtil.getPullParser(
BeanUtil.java:225)
   at org.apache.ws.axis2.Client.main(Client.java:61)

The code is this:
...
OMElement[] param1=new OMElement[6];
   Integer [] ve=new Integer[6];
   ve[0]=(new Integer(12));
   ve[1]=(new Integer(23));
   ve[2]=(new Integer(34));
   ve[3]=(new Integer(45));
   ve[4]=(new Integer(56));
   ve[5]=(new Integer(67));

   for(int i=0;i6;i++){
   XMLStreamReader reader = BeanUtil.getPullParser(ve[i]);
   StreamWrapper parser = new StreamWrapper(reader);
   StAXOMBuilder stAXMOMBuilder =
OMXMLBuilderFactory.createStAXOMBuilder (OMAbstractFactory.getOMFactory
(),parser);
   param1[i] = stAXMOMBuilder.getDocumentElement();
   }
   req2.setParam1(param1);

...
I suppose that the error is that, if I do

   Integer a = new Integer(55);
   ClassLoader cl = a.getClass().getClassLoader();

cl is null, and I don't know why!

Can you help me, please?

2007/2/28, Kay* [EMAIL PROTECTED]:


Thank you for your answer! I suppose that BeanUtil's method goes only
with javabean obj, but I'll try to apply to my project ! (sorry for my
English)
Thank you, thank you very much

Kay*

2007/2/28, Nilesh Ghorpade [EMAIL PROTECTED]:

 Hi,

 There is a utility tool in the AXIS 2 API's namely the BeanUtil I
believe.
 This class has some static methods which would enable you to convert
from an
 Object to an OMElement and vice versa.

 Hope that helps.

 Regards

 Nilesh


 - Original Message 
 From: Kay* [EMAIL PROTECTED]
 To: axis-user@ws.apache.org
 Sent: Wednesday, February 28, 2007 7:27:53 PM
 Subject: Re: setParam0(OMElement param) or xs:any


 I need to pass a variable number of different objs...
 I also tried to pass a Vector of Integer (for an example) but axis2
 doesn't know how resolve it and it gives me a xs:any ...
 I tried also to pass one my class, called Vettore (with an array of
 Object or a Vector) but when I generate the stub, it contains an its
 Vettore, different from mine...
 I can't explain better...
 Thank you for your attention!

 Kay*

 2007/2/28, Deepal Jayasinghe [EMAIL PROTECTED]:
  Hi ;
 
  I am talking about smt like below;
  public Address[] compute(Man []  data){
   //...
   }
 
  Do not use just Object ,use the actual type you want to use.
 
  Thanks
  Deepal
 
  Kay* wrote:
 
   Thank you for your answer, but I don't understand  can you
please
   do an example?Do you mean that I have to change parameters ?
   Thank you very very much!!!
  
   Kay*
  
   2007/2/27, Deepal Jayasinghe  [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED]:
  
   Hi ;
  
   When you have a method which take Object then there is no way to
 find
   out the type of that object. That is why it generates WSDL with
   xsd:any.
   To solve that U need to write the method to take the method with
   correct
   Object type (String [] or what ever).
  
   Thanks
   Deepal
  
   Kay* wrote:
  
Hello! (Sorry for my bad English...)
My problem is that my service is like this:
   
   
public Object[] compute(Object[]  data){
 //...
}
   
and MyServiceStub.Compute has
   setParam0(org.apache.axiom.om.OMElement
[] param) and get_return returns an OMElement[]...
I don't know how to create an OMElement within Object[] ...and
   viceversa.
   
Please, can you help me ?
   
Thank you very much!!!
   
Kay*
  
  
   --
   Thanks,
   Deepal
  
 
   The highest tower is built one brick at a time
  
  
  
  
 -
   To unsubscribe, e-mail:
 [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED]
  
  
  
  
 
  --
  Thanks,
  Deepal
 
 
  The highest tower is built one brick at a time
 
 
 
 
 -
  To unsubscribe, e-mail:
 [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e

Re: setParam0(OMElement param) or xs:any

2007-02-28 Thread Kay*

I need to pass a variable number of different objs...
I also tried to pass a Vector of Integer (for an example) but axis2
doesn't know how resolve it and it gives me a xs:any ...
I tried also to pass one my class, called Vettore (with an array of
Object or a Vector) but when I generate the stub, it contains an its
Vettore, different from mine...
I can't explain better...
Thank you for your attention!

Kay*

2007/2/28, Deepal Jayasinghe [EMAIL PROTECTED]:

Hi ;

I am talking about smt like below;
public Address[] compute(Man []  data){
 //...
 }

Do not use just Object ,use the actual type you want to use.

Thanks
Deepal

Kay* wrote:

 Thank you for your answer, but I don't understand  can you please
 do an example?Do you mean that I have to change parameters ?
 Thank you very very much!!!

 Kay*

 2007/2/27, Deepal Jayasinghe  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]:

 Hi ;

 When you have a method which take Object then there is no way to find
 out the type of that object. That is why it generates WSDL with
 xsd:any.
 To solve that U need to write the method to take the method with
 correct
 Object type (String [] or what ever).

 Thanks
 Deepal

 Kay* wrote:

  Hello! (Sorry for my bad English...)
  My problem is that my service is like this:
 
 
  public Object[] compute(Object[]  data){
   //...
  }
 
  and MyServiceStub.Compute has
 setParam0(org.apache.axiom.om.OMElement
  [] param) and get_return returns an OMElement[]...
  I don't know how to create an OMElement within Object[] ...and
 viceversa.
 
  Please, can you help me ?
 
  Thank you very much!!!
 
  Kay*


 --
 Thanks,
 Deepal
 
 The highest tower is built one brick at a time



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





--
Thanks,
Deepal

The highest tower is built one brick at a time



-
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: setParam0(OMElement param) or xs:any

2007-02-28 Thread Nilesh Ghorpade
Hi,

There is a utility tool in the AXIS 2 API's namely the BeanUtil I believe. This 
class has some static methods which would enable you to convert from an Object 
to an OMElement and vice versa.

Hope that helps.

Regards

Nilesh


- Original Message 
From: Kay* [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Wednesday, February 28, 2007 7:27:53 PM
Subject: Re: setParam0(OMElement param) or xs:any


I need to pass a variable number of different objs...
I also tried to pass a Vector of Integer (for an example) but axis2
doesn't know how resolve it and it gives me a xs:any ...
I tried also to pass one my class, called Vettore (with an array of
Object or a Vector) but when I generate the stub, it contains an its
Vettore, different from mine...
I can't explain better...
Thank you for your attention!

Kay*

2007/2/28, Deepal Jayasinghe [EMAIL PROTECTED]:
 Hi ;

 I am talking about smt like below;
 public Address[] compute(Man []  data){
  //...
  }

 Do not use just Object ,use the actual type you want to use.

 Thanks
 Deepal

 Kay* wrote:

  Thank you for your answer, but I don't understand  can you please
  do an example?Do you mean that I have to change parameters ?
  Thank you very very much!!!
 
  Kay*
 
  2007/2/27, Deepal Jayasinghe  [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]:
 
  Hi ;
 
  When you have a method which take Object then there is no way to find
  out the type of that object. That is why it generates WSDL with
  xsd:any.
  To solve that U need to write the method to take the method with
  correct
  Object type (String [] or what ever).
 
  Thanks
  Deepal
 
  Kay* wrote:
 
   Hello! (Sorry for my bad English...)
   My problem is that my service is like this:
  
  
   public Object[] compute(Object[]  data){
//...
   }
  
   and MyServiceStub.Compute has
  setParam0(org.apache.axiom.om.OMElement
   [] param) and get_return returns an OMElement[]...
   I don't know how to create an OMElement within Object[] ...and
  viceversa.
  
   Please, can you help me ?
  
   Thank you very much!!!
  
   Kay*
 
 
  --
  Thanks,
  Deepal
  
  The highest tower is built one brick at a time
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
 
 
 
 

 --
 Thanks,
 Deepal
 
 The highest tower is built one brick at a time



 -
 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]


 

Don't get soaked.  Take a quick peak at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather

Re: setParam0(OMElement param) or xs:any

2007-02-28 Thread Kay*

Thank you for your answer! I suppose that BeanUtil's method goes only
with javabean obj, but I'll try to apply to my project ! (sorry for my
English)
Thank you, thank you very much

Kay*

2007/2/28, Nilesh Ghorpade [EMAIL PROTECTED]:


Hi,

There is a utility tool in the AXIS 2 API's namely the BeanUtil I believe.
This class has some static methods which would enable you to convert from an
Object to an OMElement and vice versa.

Hope that helps.

Regards

Nilesh


- Original Message 
From: Kay* [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Wednesday, February 28, 2007 7:27:53 PM
Subject: Re: setParam0(OMElement param) or xs:any


I need to pass a variable number of different objs...
I also tried to pass a Vector of Integer (for an example) but axis2
doesn't know how resolve it and it gives me a xs:any ...
I tried also to pass one my class, called Vettore (with an array of
Object or a Vector) but when I generate the stub, it contains an its
Vettore, different from mine...
I can't explain better...
Thank you for your attention!

Kay*

2007/2/28, Deepal Jayasinghe [EMAIL PROTECTED]:
 Hi ;

 I am talking about smt like below;
 public Address[] compute(Man []  data){
  //...
  }

 Do not use just Object ,use the actual type you want to use.

 Thanks
 Deepal

 Kay* wrote:

  Thank you for your answer, but I don't understand  can you please
  do an example?Do you mean that I have to change parameters ?
  Thank you very very much!!!
 
  Kay*
 
  2007/2/27, Deepal Jayasinghe  [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]:
 
  Hi ;
 
  When you have a method which take Object then there is no way to
find
  out the type of that object. That is why it generates WSDL with
  xsd:any.
  To solve that U need to write the method to take the method with
  correct
  Object type (String [] or what ever).
 
  Thanks
  Deepal
 
  Kay* wrote:
 
   Hello! (Sorry for my bad English...)
   My problem is that my service is like this:
  
  
   public Object[] compute(Object[]  data){
//...
   }
  
   and MyServiceStub.Compute has
  setParam0(org.apache.axiom.om.OMElement
   [] param) and get_return returns an OMElement[]...
   I don't know how to create an OMElement within Object[] ...and
  viceversa.
  
   Please, can you help me ?
  
   Thank you very much!!!
  
   Kay*
 
 
  --
  Thanks,
  Deepal
 

  The highest tower is built one brick at a time
 
 
 
 
-
  To unsubscribe, e-mail:
[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
 
 
 
 

 --
 Thanks,
 Deepal


 The highest tower is built one brick at a time




-
 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]


 
Looking for earth-friendly autos?
 Browse Top Cars by Green Rating at Yahoo! Autos' Green Center.


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



Re: setParam0(OMElement param) or xs:any

2007-02-27 Thread Deepal Jayasinghe
Hi ;

When you have a method which take Object then there is no way to find
out the type of that object. That is why it generates WSDL with xsd:any.
To solve that U need to write the method to take the method with correct
Object type (String [] or what ever).

Thanks
Deepal

Kay* wrote:

 Hello! (Sorry for my bad English...)
 My problem is that my service is like this:


 public Object[] compute(Object[]  data){
  //...
 }

 and MyServiceStub.Compute has setParam0(org.apache.axiom.om.OMElement
 [] param) and get_return returns an OMElement[]...
 I don't know how to create an OMElement within Object[] ...and viceversa.

 Please, can you help me ?

 Thank you very much!!!

 Kay*


-- 
Thanks,
Deepal

The highest tower is built one brick at a time



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



Re: setParam0(OMElement param) or xs:any

2007-02-27 Thread Kay*

Thank you for your answer, but I don't understand  can you please do an
example?Do you mean that I have to change parameters ?
Thank you very very much!!!

Kay*

2007/2/27, Deepal Jayasinghe [EMAIL PROTECTED]:


Hi ;

When you have a method which take Object then there is no way to find
out the type of that object. That is why it generates WSDL with xsd:any.
To solve that U need to write the method to take the method with correct
Object type (String [] or what ever).

Thanks
Deepal

Kay* wrote:

 Hello! (Sorry for my bad English...)
 My problem is that my service is like this:


 public Object[] compute(Object[]  data){
  //...
 }

 and MyServiceStub.Compute has setParam0(org.apache.axiom.om.OMElement
 [] param) and get_return returns an OMElement[]...
 I don't know how to create an OMElement within Object[] ...and
viceversa.

 Please, can you help me ?

 Thank you very much!!!

 Kay*


--
Thanks,
Deepal

The highest tower is built one brick at a time



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




RE: setParam0(OMElement param) or xs:any

2007-02-27 Thread Jones, Alan R
Kay,
 
This may helpIf you mean that your Object[] in your example
represents a specific object (rather than an array of actual base class
Objects) and you are wondering why you are getting the default OMElement
as a return type, I had a similar problem. I had the wrong namespace
prefix in the response message part of my WSDL...
 
 
...given the following namespace definitions:
 
xmlns:ns1=http://GrantCredit.webservice.rules.space.com/types
http://GrantCredit.webservice.rules.space.com/typesnote this is
the 'types' genned by the wsdl2java tooling

xmlns:ns=http://GrantCredit.webservice.rules.space.com
http://GrantCredit.webservice.rules.space.com 

 
...the following was incorrect (red) because in order to be genned into
the correct EvaluateRule and EvaluateRuleResponse objects
I should reference the correct namespace/prefix: 

wsdl:message name=EvaluateRuleMessage

 wsdl:part element=ns:EvaluateRule name=Request /

/wsdl:message

wsdl:message name=EvaluateRuleResponseMessage

 wsdl:part element=ns:EvaluateRuleResponse name=Response /

/wsdl:message

wsdl:portType name=GrantCreditServicePortType

 wsdl:operation name=grantCredit

  wsdl:input message=ns:EvaluateRuleMessage /

  wsdl:output message=ns:EvaluateRuleResponseMessage /

 /wsdl:operation

/wsdl:portType

 

The result was my return object was generated as an OMElement because i
guess it got confused as to what object it needed to be. 

...corrected (red):

 

wsdl:message name=EvaluateRuleMessage

 wsdl:part element=ns1:EvaluateRule name=Request /

/wsdl:message

wsdl:message name=EvaluateRuleResponseMessage

 wsdl:part element=ns1:EvaluateRuleResponse name=Response /

/wsdl:message

wsdl:portType name=GrantCreditServicePortType

 wsdl:operation name=grantCredit

  wsdl:input message=ns:EvaluateRuleMessage /

  wsdl:output message=ns:EvaluateRuleResponseMessage /

 /wsdl:operation

/wsdl:portType

 
 
This resulted int he correct return type. Maybe you need to review your
WSDL?
 
 


aj 


 
Alan R Jones 
Boeing SIS Mission Systems 
Denver Engineering Center (BDEC) 





From: Kay* [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 27, 2007 5:55 AM
To: axis-user@ws.apache.org
Subject: Re: setParam0(OMElement param) or xs:any


Thank you for your answer, but I don't understand  can you please do
an example?Do you mean that I have to change parameters ?
Thank you very very much!!!

Kay*


2007/2/27, Deepal Jayasinghe  [EMAIL PROTECTED]: 

Hi ;

When you have a method which take Object then there is no way to
find 
out the type of that object. That is why it generates WSDL with
xsd:any.
To solve that U need to write the method to take the method with
correct
Object type (String [] or what ever).

Thanks
Deepal

Kay* wrote:

 Hello! (Sorry for my bad English...)
 My problem is that my service is like this:


 public Object[] compute(Object[]  data){
  //...
 }

 and MyServiceStub.Compute has
setParam0(org.apache.axiom.om.OMElement
 [] param) and get_return returns an OMElement[]...
 I don't know how to create an OMElement within Object[] ...and
viceversa.

 Please, can you help me ?

 Thank you very much!!!

 Kay*


--
Thanks,
Deepal

The highest tower is built one brick at a time 




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








Re: setParam0(OMElement param) or xs:any

2007-02-27 Thread Deepal Jayasinghe
Hi ;

I am talking about smt like below;
public Address[] compute(Man []  data){
 //...
 }

Do not use just Object ,use the actual type you want to use.

Thanks
Deepal

Kay* wrote:

 Thank you for your answer, but I don't understand  can you please
 do an example?Do you mean that I have to change parameters ?
 Thank you very very much!!!

 Kay*

 2007/2/27, Deepal Jayasinghe  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]:

 Hi ;

 When you have a method which take Object then there is no way to find
 out the type of that object. That is why it generates WSDL with
 xsd:any.
 To solve that U need to write the method to take the method with
 correct
 Object type (String [] or what ever).

 Thanks
 Deepal

 Kay* wrote:

  Hello! (Sorry for my bad English...)
  My problem is that my service is like this:
 
 
  public Object[] compute(Object[]  data){
   //...
  }
 
  and MyServiceStub.Compute has
 setParam0(org.apache.axiom.om.OMElement
  [] param) and get_return returns an OMElement[]...
  I don't know how to create an OMElement within Object[] ...and
 viceversa.
 
  Please, can you help me ?
 
  Thank you very much!!!
 
  Kay*


 --
 Thanks,
 Deepal
 
 The highest tower is built one brick at a time



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





-- 
Thanks,
Deepal

The highest tower is built one brick at a time



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



setParam0(OMElement param) or xs:any

2007-02-26 Thread Kay*

Hello! (Sorry for my bad English...)
My problem is that my service is like this:


public Object[] compute(Object[]  data){
//...
}

and MyServiceStub.Compute has setParam0(org.apache.axiom.om.OMElement[]
param) and get_return returns an OMElement[]...
I don't know how to create an OMElement within Object[] ...and viceversa.

Please, can you help me ?

Thank you very much!!!

Kay*