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 Nirmit Desai <ni...@us.ibm.com> on 2006/08/19 17:07:48 UTC

[Axis2] does client need to know MEP?

Hi all,

I was writing my client without using the generated stub (but mimicking
what the stub does). I saw that the generated stub creates different kinds
of operations OutInAxisOperation, InOnlyAxisOpeepending on how the message
exchange pattern of the operation is on the sever side.

But how does a client discover an MEP for a service operation? It is not in
WSDL.

 So my question is, is it necessary to create the right kind of operation
to correctly invoke the service or it is optional?

Thanks,

-Nirmit


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


Re: [Axis2] does client need to know MEP?

Posted by Martin Gainty <mg...@hotmail.com>.
I have not see Erans answer so I cannot comment on the accuracy of the solution

If you look at the Axis source DescriptionBuilder.java you will see a method called processActionMapping
The mappingIterator will construct itself and iterate on elements based on the existence of "actionMapping" in services.xml

Does this answer your question ?
M-
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



----- Original Message ----- 
From: "Nirmit Desai" <ni...@us.ibm.com>
To: <ax...@ws.apache.org>
Sent: Saturday, August 19, 2006 7:50 PM
Subject: Re: [Axis2] does client need to know MEP?


> Hi Martin,
> 
> Thanks for the info. What you describe happens at the service side. My
> concern is whether the client needs to be aware about the MEP of the
> operation it is invoking.
> 
> Eran answered my questions and I need not use specialized operation client.
> Still, I have to figure out the MEP of the operation by parsing WSDL and
> looking at whethyer the operation has both input and out or just the input.
> 
> I am wondering if tthere is any easier way for a client to know the MEP.
> 
> Thanks
> 
> -Nirmit
> 
> 
> 
>                                                                           
>             "Martin Gainty"                                               
>             <mgainty@hotmail.                                             
>             com>                                                       To 
>                                       <ax...@ws.apache.org>,          
>             08/19/2006 06:11          <ch...@opensource.lk>           
>             PM                                                         cc 
>                                                                           
>                                                                   Subject 
>             Please respond to         Re: [Axis2] does client need to     
>             axis-user@ws.apac         know MEP?                           
>                  he.org                                                   
>                                                                           
>                                                                           
>                                                                           
>                                                                           
>                                                                           
> 
> 
> 
> 
> The answer is the MEP of an Operation is determined from the Java Method
> specifically..
> 
> All the public methods in the service implementation class are exposed
> (whether you specified that in services.xml or not.)
> Axis2 calculates the MEP of an operation by checking its corresponding java
> method.
> If the method is void, the MEP will be in-only;
> else, it will be in-out,
> 
> (depending on which MEP message receiver will be set.)
> 
> http://www.developer.com/java/ent/article.php/3613896
> 
> Does this answer your question?
> M-
> *********************************************************************
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
> 
> 
> 
> ----- Original Message -----
> From: "Eran Chinthaka" <ch...@opensource.lk>
> To: <ax...@ws.apache.org>
> Sent: Saturday, August 19, 2006 3:04 PM
> Subject: Re: [Axis2] does client need to know MEP?
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
>

Re: [Axis2] does client need to know MEP?

Posted by Nirmit Desai <ni...@us.ibm.com>.
Hi Martin,

Thanks for the info. What you describe happens at the service side. My
concern is whether the client needs to be aware about the MEP of the
operation it is invoking.

Eran answered my questions and I need not use specialized operation client.
Still, I have to figure out the MEP of the operation by parsing WSDL and
looking at whethyer the operation has both input and out or just the input.

I am wondering if tthere is any easier way for a client to know the MEP.

Thanks

-Nirmit



                                                                           
             "Martin Gainty"                                               
             <mgainty@hotmail.                                             
             com>                                                       To 
                                       <ax...@ws.apache.org>,          
             08/19/2006 06:11          <ch...@opensource.lk>           
             PM                                                         cc 
                                                                           
                                                                   Subject 
             Please respond to         Re: [Axis2] does client need to     
             axis-user@ws.apac         know MEP?                           
                  he.org                                                   
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




The answer is the MEP of an Operation is determined from the Java Method
specifically..

All the public methods in the service implementation class are exposed
(whether you specified that in services.xml or not.)
Axis2 calculates the MEP of an operation by checking its corresponding java
method.
If the method is void, the MEP will be in-only;
else, it will be in-out,

(depending on which MEP message receiver will be set.)

http://www.developer.com/java/ent/article.php/3613896

Does this answer your question?
M-
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



----- Original Message -----
From: "Eran Chinthaka" <ch...@opensource.lk>
To: <ax...@ws.apache.org>
Sent: Saturday, August 19, 2006 3:04 PM
Subject: Re: [Axis2] does client need to know MEP?




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


Re: [Axis2] does client need to know MEP?

Posted by Martin Gainty <mg...@hotmail.com>.
The answer is the MEP of an Operation is determined from the Java Method specifically..

All the public methods in the service implementation class are exposed (whether you specified that in services.xml or not.)
Axis2 calculates the MEP of an operation by checking its corresponding java method. 
If the method is void, the MEP will be in-only; 
else, it will be in-out, 

(depending on which MEP message receiver will be set.)

http://www.developer.com/java/ent/article.php/3613896

Does this answer your question?
M-
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



----- Original Message ----- 
From: "Eran Chinthaka" <ch...@opensource.lk>
To: <ax...@ws.apache.org>
Sent: Saturday, August 19, 2006 3:04 PM
Subject: Re: [Axis2] does client need to know MEP?


Re: [Axis2] does client need to know MEP?

Posted by Eran Chinthaka <ch...@opensource.lk>.
Nirmit Desai wrote:

> Hi Eran,
> 
> Thanks for the clarification. However, what do you mean by simple stuff?
> Can you point me to the situations that demand such specialized operations?

If you wanna touch message context, if you wanna touch the sending SOAP
message to customize a lot.

> or  the use of operation clients? I am interested in knowing:
> 
> --whether ServiceClient is good enough for invoking doc/lit services,
> taking one message part at the most, and with in-only or in-out MEPs? The
> soapAction would be set in the Options. If so I would like to stick to the
> ServiceClient usage.

Yep. ServiceClient is ideal for you.

> 
> --If ServiceClient can indeed handle the above, and blocking invocations
> are fine, I should use fireAndForget() for in-only MEP and sendReceive()
> for in-out MEP. Is that right?

For IN only :
  - sendRobust
  - fireAndForget are fine

For IN-OUT
  - sendReceive is fine for a blocking invocation.

-- Chinthaka


Re: [Axis2] does client need to know MEP?

Posted by Nirmit Desai <ni...@us.ibm.com>.
                                                                           
             Eran Chinthaka                                                
             <chinthaka@openso                                             
             urce.lk>                                                   To 
                                       axis-user@ws.apache.org             
             08/19/2006 12:02                                           cc 
             PM                                                            
                                                                   Subject 
                                       Re: [Axis2] does client need to     
             Please respond to         know MEP?                           
             axis-user@ws.apac                                             
                  he.org                                                   
                                                                           
                                                                           
                                                                           
                                                                           





Hi Eran,

Thanks for the clarification. However, what do you mean by simple stuff?
Can you point me to the situations that demand such specialized operations?
or  the use of operation clients? I am interested in knowing:

--whether ServiceClient is good enough for invoking doc/lit services,
taking one message part at the most, and with in-only or in-out MEPs? The
soapAction would be set in the Options. If so I would like to stick to the
ServiceClient usage.

--If ServiceClient can indeed handle the above, and blocking invocations
are fine, I should use fireAndForget() for in-only MEP and sendReceive()
for in-out MEP. Is that right?

Thanks a lot, I appreciate your help,

-Nirmit

Nirmit Desai wrote:
> Hi all,
>
> I was writing my client without using the generated stub (but mimicking
> what the stub does). I saw that the generated stub creates different
kinds
> of operations OutInAxisOperation, InOnlyAxisOpeepending on how the
message
> exchange pattern of the operation is on the sever side.
>
> But how does a client discover an MEP for a service operation? It is not
in
> WSDL.

MEP can always be deduced by the WSDL. Just look at the messages for an
operation. If you have
             one input and one output - IN-OUT
             one input - IN-Only.

Just identify the MEP and invoke either sendReceive or send depending on
that. No you don't need to juggle with OutInAxisOperation,
InOnlyAxisOperations if you are doing somple stuff.


-- Chinthaka

(See attached file: signature.asc)

Re: [Axis2] does client need to know MEP?

Posted by Eran Chinthaka <ch...@opensource.lk>.
Nirmit Desai wrote:
> Hi all,
> 
> I was writing my client without using the generated stub (but mimicking
> what the stub does). I saw that the generated stub creates different kinds
> of operations OutInAxisOperation, InOnlyAxisOpeepending on how the message
> exchange pattern of the operation is on the sever side.
> 
> But how does a client discover an MEP for a service operation? It is not in
> WSDL.

MEP can always be deduced by the WSDL. Just look at the messages for an
operation. If you have
	one input and one output - IN-OUT
	one input - IN-Only.

Just identify the MEP and invoke either sendReceive or send depending on
that. No you don't need to juggle with OutInAxisOperation,
InOnlyAxisOperations if you are doing somple stuff.


-- Chinthaka