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 Philipp Leitner <ph...@gmx.at> on 2007/03/24 13:05:14 UTC

Receiving complex return values when using ServiceClient.sendReceive(...)

Hi all,

let me apologize in advance for asking a very simple question on this list:

I am using the Axis2 ServiceClient interface to do a blocking IN-OUT 
call to a Web Service:

<snip>
   ServiceClient sender = new ServiceClient();
   sender.setOptions(axis2Options);
   OMElement result = sender.sendReceive(axisOp);
   System.out.println(result);
</snip>

This will print a result of

<snip>

<getMyAddressResponse 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
   <getMyAddressReturn href="#id0" />
</getMyAddressResponse>

</snip>

. The obvious question now is: how do I get the actual response (the 
type with the id 'id0') from this OMElement?

What kind of surprises me is that an asynchronous call (using 
ServiceClient.sendReceiveNonBlocking(...) ) returns a full SOAP message 
as Axiom model, including the 'multiref' elements which contain the 
complex type responses. What is the reason for the blocking call 
behaving differently? The behavior of the non-blocking call seems a lot 
more natural to me ...

I am using Axis2 1.1.1 on the client side, and Axis1 (yes, the original 
Axis, not Axis2 1.0!) on the server side.

I would very much appreciate a little help or a documentation pointer on 
this issue (I would not call it a problem, since it is obviously just me 
not understanding how Axis2 works :-) )!

/philipp

-- 
Philipp Wolfgang Leitner, Bakk.rer.soc.oec.
0225511
Vienna University of Technology

"Data Mining is the art of torturing the Enterprise Data until it 
confesses ... but if you torture the data long enough it will confess to 
anything."

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


Re: Receiving complex return values when using ServiceClient.sendReceive(...)

Posted by Philipp Leitner <ph...@gmx.at>.
thank you for the info ... I would not have expected this to be a bug, 
but rather wrong usage on my side ...

/philipp

Cédric Girodengo schrieb:
> Hi!
> 
> Unfortunately, I have no answer for you, but I just encountered the same
> problem today. I opened an issue on Axis2 bugtracker :
> 
> https://issues.apache.org/jira/browse/AXIS2-2408
> 
> Wait and see...
> 
> 
> Philipp Leitner-2 wrote:
>> Hi all,
>>
>> let me apologize in advance for asking a very simple question on this
>> list:
>>
>> I am using the Axis2 ServiceClient interface to do a blocking IN-OUT 
>> call to a Web Service:
>>
>> <snip>
>>    ServiceClient sender = new ServiceClient();
>>    sender.setOptions(axis2Options);
>>    OMElement result = sender.sendReceive(axisOp);
>>    System.out.println(result);
>> </snip>
>>
>> This will print a result of
>>
>> <snip>
>>
>> <getMyAddressResponse 
>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
>> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>>    <getMyAddressReturn href="#id0" />
>> </getMyAddressResponse>
>>
>> </snip>
>>
>> . The obvious question now is: how do I get the actual response (the 
>> type with the id 'id0') from this OMElement?
>>
>> What kind of surprises me is that an asynchronous call (using 
>> ServiceClient.sendReceiveNonBlocking(...) ) returns a full SOAP message 
>> as Axiom model, including the 'multiref' elements which contain the 
>> complex type responses. What is the reason for the blocking call 
>> behaving differently? The behavior of the non-blocking call seems a lot 
>> more natural to me ...
>>
>> I am using Axis2 1.1.1 on the client side, and Axis1 (yes, the original 
>> Axis, not Axis2 1.0!) on the server side.
>>
>> I would very much appreciate a little help or a documentation pointer on 
>> this issue (I would not call it a problem, since it is obviously just me 
>> not understanding how Axis2 works :-) )!
>>
>> /philipp
>>
>> -- 
>> Philipp Wolfgang Leitner, Bakk.rer.soc.oec.
>> 0225511
>> Vienna University of Technology
>>
>> "Data Mining is the art of torturing the Enterprise Data until it 
>> confesses ... but if you torture the data long enough it will confess to 
>> anything."
>>
>> ---------------------------------------------------------------------
>> 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: Receiving complex return values when using ServiceClient.sendReceive(...)

Posted by Cédric Girodengo <ce...@capgemini.com>.
Hi!

Unfortunately, I have no answer for you, but I just encountered the same
problem today. I opened an issue on Axis2 bugtracker :

https://issues.apache.org/jira/browse/AXIS2-2408

Wait and see...


Philipp Leitner-2 wrote:
> 
> Hi all,
> 
> let me apologize in advance for asking a very simple question on this
> list:
> 
> I am using the Axis2 ServiceClient interface to do a blocking IN-OUT 
> call to a Web Service:
> 
> <snip>
>    ServiceClient sender = new ServiceClient();
>    sender.setOptions(axis2Options);
>    OMElement result = sender.sendReceive(axisOp);
>    System.out.println(result);
> </snip>
> 
> This will print a result of
> 
> <snip>
> 
> <getMyAddressResponse 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>    <getMyAddressReturn href="#id0" />
> </getMyAddressResponse>
> 
> </snip>
> 
> . The obvious question now is: how do I get the actual response (the 
> type with the id 'id0') from this OMElement?
> 
> What kind of surprises me is that an asynchronous call (using 
> ServiceClient.sendReceiveNonBlocking(...) ) returns a full SOAP message 
> as Axiom model, including the 'multiref' elements which contain the 
> complex type responses. What is the reason for the blocking call 
> behaving differently? The behavior of the non-blocking call seems a lot 
> more natural to me ...
> 
> I am using Axis2 1.1.1 on the client side, and Axis1 (yes, the original 
> Axis, not Axis2 1.0!) on the server side.
> 
> I would very much appreciate a little help or a documentation pointer on 
> this issue (I would not call it a problem, since it is obviously just me 
> not understanding how Axis2 works :-) )!
> 
> /philipp
> 
> -- 
> Philipp Wolfgang Leitner, Bakk.rer.soc.oec.
> 0225511
> Vienna University of Technology
> 
> "Data Mining is the art of torturing the Enterprise Data until it 
> confesses ... but if you torture the data long enough it will confess to 
> anything."
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Receiving-complex-return-values-when-using-ServiceClient.sendReceive%28...%29-tf3458452.html#a9692207
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: The code generated with WSDL2Code is invalid because of inner class Class method getClass()

Posted by Amila Suriarachchi <am...@gmail.com>.
you could have an element called "class" to which ADB generates getClass
method.
I'll fix this

On 3/24/07, Lorenzo Dini <Lo...@cern.ch> wrote:
>
>
> Hi All,
>
> Why in the generated code for the client side with ADB the inner class
> Class
> has a method called getClass()?
>
> This is illegal because that method is a illegal redefinition of
> Object.getClass().
>
> Why not getClazz() ?
>
> I changed in my code and it works fine...
>
> Lorenzo
> --
>
> Lorenzo Dini
>
> CERN ­ European Organization for Nuclear Research
> Information Technology Department
> CH-1211 Geneva 23
>
> Building 31 - Office S-021
> Phone: +41 (0) 22 7672013
> Fax: +41 (0) 22 7668847
> E-mail: Lorenzo.Dini@cern.ch
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

The code generated with WSDL2Code is invalid because of inner class Class method getClass()

Posted by Lorenzo Dini <Lo...@cern.ch>.
Hi All,

Why in the generated code for the client side with ADB the inner class Class
has a method called getClass()?

This is illegal because that method is a illegal redefinition of
Object.getClass().

Why not getClazz() ?

I changed in my code and it works fine...

Lorenzo 
--
 
Lorenzo Dini

CERN ­ European Organization for Nuclear Research
Information Technology Department
CH-1211 Geneva 23  

Building 31 - Office S-021
Phone: +41 (0) 22 7672013
Fax: +41 (0) 22 7668847
E-mail: Lorenzo.Dini@cern.ch



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