You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Kay* <ka...@gmail.com> on 2007/02/26 14:59:13 UTC
setParam0(OMElement param) or xs:any
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*
Re: setParam0(OMElement param) or xs:any
Posted by Kay* <ka...@gmail.com>.
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 <de...@opensource.lk>:
> 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 < deepal@opensource.lk
> > <ma...@opensource.lk>>:
> >
> > 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: axis-user-unsubscribe@ws.apache.org
> > <ma...@ws.apache.org>
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> > <ma...@ws.apache.org>
> >
> >
> >
> >
>
> --
> Thanks,
> Deepal
> ................................................................
> "The highest tower is built one brick at a time"
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: setParam0(OMElement param) or xs:any
Posted by Deepal Jayasinghe <de...@opensource.lk>.
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 < deepal@opensource.lk
> <ma...@opensource.lk>>:
>
> 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: axis-user-unsubscribe@ws.apache.org
> <ma...@ws.apache.org>
> For additional commands, e-mail: axis-user-help@ws.apache.org
> <ma...@ws.apache.org>
>
>
>
>
--
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
RE: setParam0(OMElement param) or xs:any
Posted by "Jones, Alan R" <al...@boeing.com>.
Kay,
This may help....If 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/types> < note 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 S&IS Mission Systems
Denver Engineering Center (BDEC)
________________________________
From: Kay* [mailto:kay2000@gmail.com]
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 < deepal@opensource.lk>:
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: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: setParam0(OMElement param) or xs:any
Posted by Kay* <ka...@gmail.com>.
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 <de...@opensource.lk>:
>
> 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: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
Re: setParam0(OMElement param) or xs:any
Posted by Deepal Jayasinghe <de...@opensource.lk>.
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: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org