You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Amila Suriarachchi <am...@gmail.com> on 2008/04/17 08:14:44 UTC

[Axis2] Getting axis2 operation from the service

hi all,

Have a look at the code in the AxisService getOperation method.
(AxisService.java 1613)

if (axisOperation == null) {
            axisOperation = (AxisOperation) operationsAliasesMap
                    .get(operationName.getLocalPart());

            if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled())
                log.debug("Operations aliases map: " +
operationsAliasesMap);
        }

Here it tries to get the operation assuming operation name local part is
equals to the action.
Although this is a common practise it is not a spec requirement.

As a result of this code it fails codegen for wsdls like this.

<wsdl:portType name="OrderProcessorService">
        <wsdl:operation name="SubmitOrderTransactedQueue">
            <wsdl:input wsaw:Action="SubmitOrder"

message="tns:OrderProcessorService_SubmitOrderTransactedQueue_InputMessage"/>
        </wsdl:operation>
        <wsdl:operation name="SubmitOrder">
            <wsdl:input wsaw:Action="SubmitOrderOnePhase"
message="tns:OrderProcessorService_SubmitOrder_InputMessage"/>
        </wsdl:operation>
        <wsdl:operation name="isOnline">
            <wsdl:input wsaw:Action="isOnline"
message="tns:OrderProcessorService_isOnline_InputMessage"/>
        </wsdl:operation>
    </wsdl:portType>

since the Action SubmitOrder is defined in first operation it returns a
wrong action when checking
for second operation. It should return null.

Shall we remove this part?

thanks,
Amila.

-- 
Amila Suriarachchi,
WSO2 Inc.

Re: [Axis2] Getting axis2 operation from the service

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
Amila, wsaw:Action is of type anyURI. So I think there is a bug here- the 
string "SubmitOrder" should get resolved as a URI relative to the baseURI 
of the document.

If we fix that then these won't match and the right thing will happen.

Sanjiva.

Amila Suriarachchi wrote:
> 
> hi all,
> 
> Have a look at the code in the AxisService getOperation method. 
> (AxisService.java 1613)
> 
> if (axisOperation == null) {
>             axisOperation = (AxisOperation) operationsAliasesMap
>                     .get(operationName.getLocalPart());
> 
>             if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled())
>                 log.debug("Operations aliases map: " + 
> operationsAliasesMap);
>         }
> 
> Here it tries to get the operation assuming operation name local part is 
> equals to the action.
> Although this is a common practise it is not a spec requirement.
> 
> As a result of this code it fails codegen for wsdls like this.
> 
> <wsdl:portType name="OrderProcessorService">
>         <wsdl:operation name="SubmitOrderTransactedQueue">
>             <wsdl:input wsaw:Action="SubmitOrder"
>                         
> message="tns:OrderProcessorService_SubmitOrderTransactedQueue_InputMessage"/>
>         </wsdl:operation>
>         <wsdl:operation name="SubmitOrder">
>             <wsdl:input wsaw:Action="SubmitOrderOnePhase" 
> message="tns:OrderProcessorService_SubmitOrder_InputMessage"/>
>         </wsdl:operation>
>         <wsdl:operation name="isOnline">
>             <wsdl:input wsaw:Action="isOnline" 
> message="tns:OrderProcessorService_isOnline_InputMessage"/>
>         </wsdl:operation>
>     </wsdl:portType>
> 
> since the Action SubmitOrder is defined in first operation it returns a 
> wrong action when checking
> for second operation. It should return null.
> 
> Shall we remove this part?
> 
> thanks,
> Amila.
> 
> -- 
> Amila Suriarachchi,
> WSO2 Inc.

-- 
Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
Member; Apache Software Foundation; http://www.apache.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

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


Re: [Axis2] Getting axis2 operation from the service

Posted by Deepal jayasinghe <de...@gmail.com>.
Hi All,
I would like to make a suggestion to solve the problem.
At the moment we store both
localname --> AxisOperation and
action --> AxisOperation

mapping in the operation alias mapping , IMO which is not correct. So we 
need to first fix that problem meaning we need to have two tables
 - One to keep action to AxisOperation mapping  and  (operationsAliasesMap)
 - One to keep operation local name to AxisOperation mapping  
(localnameToOperationMappingTable)

So when we call
AxisService.getOpeartion(QName operationName) {
  // First check whether the operation is there in the child table , if 
so return that
  // Next check localnameToOperationMappingTable with the local name of 
the operationName
 // If found return that else return null
}

And when we call
AxisService.getOperationByAction(){
//here we just check in the operationsAliasesMap. if the operation is 
there we return that else we return null.
}

Do the same thing for getOperationBySOAPAction

If we do so we do not need to change anywhere  else.
Thank you!
Deepal
> No, but then I'm not someone with a WSDL centric view of the world ;-)
>
> I've taken another look, I think we can remove that line in that
> method and retain the current runtime behaviour and fix the codegen
> behaviour.... sorry for jumping in without the full facts.
> David
>
> On Thu, Apr 17, 2008 at 6:53 PM, Sanjiva Weerawarana
> <sa...@opensource.lk> wrote:
>   
>> David Illsley wrote:
>>
>>     
>>> Regardless of whether I think this is a bug, there are plenty of
>>> people who think it's a feature.... we simply cannot remove the
>>> existing runtime behaviour that the operation name is always a valid
>>> action.
>>>
>>>       
>>  David, that position is unacceptable if that hack algorithm we have breaks
>> valid WSDLs right?
>>
>>  In this case however, I do think that the problem is because we're not
>> properly URIfying @wsaw:Action properly.
>>
>>  Sanjiva.
>>
>>  --
>>  Sanjiva Weerawarana, Ph.D.
>>  Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
>>  Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
>>  Member; Apache Software Foundation; http://www.apache.org/
>>  Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/
>>
>>  ---------------------------------------------------------------------
>>
>>  To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>>  For additional commands, e-mail: axis-dev-help@ws.apache.org
>>
>>
>>     
>
>
>
>   


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


Re: [Axis2] Getting axis2 operation from the service

Posted by David Illsley <da...@gmail.com>.
No, but then I'm not someone with a WSDL centric view of the world ;-)

I've taken another look, I think we can remove that line in that
method and retain the current runtime behaviour and fix the codegen
behaviour.... sorry for jumping in without the full facts.
David

On Thu, Apr 17, 2008 at 6:53 PM, Sanjiva Weerawarana
<sa...@opensource.lk> wrote:
> David Illsley wrote:
>
> > Regardless of whether I think this is a bug, there are plenty of
> > people who think it's a feature.... we simply cannot remove the
> > existing runtime behaviour that the operation name is always a valid
> > action.
> >
>
>  David, that position is unacceptable if that hack algorithm we have breaks
> valid WSDLs right?
>
>  In this case however, I do think that the problem is because we're not
> properly URIfying @wsaw:Action properly.
>
>  Sanjiva.
>
>  --
>  Sanjiva Weerawarana, Ph.D.
>  Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
>  Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
>  Member; Apache Software Foundation; http://www.apache.org/
>  Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/
>
>  ---------------------------------------------------------------------
>
>  To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>  For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>



-- 
David Illsley - IBM Web Services Development

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


Re: [Axis2] Getting axis2 operation from the service

Posted by Amila Suriarachchi <am...@gmail.com>.
On Thu, Apr 17, 2008 at 11:23 PM, Sanjiva Weerawarana <sa...@opensource.lk>
wrote:

> David Illsley wrote:
>
> > Regardless of whether I think this is a bug, there are plenty of
> > people who think it's a feature.... we simply cannot remove the
> > existing runtime behaviour that the operation name is always a valid
> > action.
> >
>
> David, that position is unacceptable if that hack algorithm we have breaks
> valid WSDLs right?
>
> In this case however, I do think that the problem is because we're not
> properly URIfying @wsaw:Action

properly.


Since this is a problem with  wsdl  then  we have to change the wsdl. So no
need to do this change.

thanks,
Amila.

>
>
> Sanjiva.
> --
> Sanjiva Weerawarana, Ph.D.
> Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
> Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
> Member; Apache Software Foundation; http://www.apache.org/
> Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Re: [Axis2] Getting axis2 operation from the service

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
David Illsley wrote:
> Regardless of whether I think this is a bug, there are plenty of
> people who think it's a feature.... we simply cannot remove the
> existing runtime behaviour that the operation name is always a valid
> action.

David, that position is unacceptable if that hack algorithm we have breaks 
valid WSDLs right?

In this case however, I do think that the problem is because we're not 
properly URIfying @wsaw:Action properly.

Sanjiva.
-- 
Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
Member; Apache Software Foundation; http://www.apache.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

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


Re: [Axis2] Getting axis2 operation from the service

Posted by David Illsley <da...@gmail.com>.
Regardless of whether I think this is a bug, there are plenty of
people who think it's a feature.... we simply cannot remove the
existing runtime behaviour that the operation name is always a valid
action.
David

On Thu, Apr 17, 2008 at 3:39 PM, Amila Suriarachchi
<am...@gmail.com> wrote:
>
>
>
> On Thu, Apr 17, 2008 at 4:08 PM, David Illsley <da...@gmail.com>
> wrote:
> > Amila,
> > As much as I'd lobe to remove this non-standard nonsense action
> > processing, unfortunately it would break a lot of user applications,
> > so I don't believe we can.
>
> This means you also agrees this is a bug.  So we need to fix this. Because
> this breaks some correct
> wsdl file. If someone complain about this we have to fix that accordingly.
>
> thanks,
> Amila.
> >
> >
> >
> >
> > David
> >
> >
> >
> >
> > On Thu, Apr 17, 2008 at 7:14 AM, Amila Suriarachchi
> > <am...@gmail.com> wrote:
> > >
> > > hi all,
> > >
> > > Have a look at the code in the AxisService getOperation method.
> > > (AxisService.java 1613)
> > >
> > > if (axisOperation == null) {
> > >             axisOperation = (AxisOperation) operationsAliasesMap
> > >                     .get(operationName.getLocalPart());
> > >
> > >             if (LoggingControl.debugLoggingAllowed &&
> log.isDebugEnabled())
> > >                 log.debug("Operations aliases map: " +
> > > operationsAliasesMap);
> > >         }
> > >
> > > Here it tries to get the operation assuming operation name local part is
> > > equals to the action.
> > >  Although this is a common practise it is not a spec requirement.
> > >
> > > As a result of this code it fails codegen for wsdls like this.
> > >
> > > <wsdl:portType name="OrderProcessorService">
> > >         <wsdl:operation name="SubmitOrderTransactedQueue">
> > >              <wsdl:input wsaw:Action="SubmitOrder"
> > >
> > >
> message="tns:OrderProcessorService_SubmitOrderTransactedQueue_InputMessage"/>
> > >         </wsdl:operation>
> > >         <wsdl:operation name="SubmitOrder">
> > >              <wsdl:input wsaw:Action="SubmitOrderOnePhase"
> > > message="tns:OrderProcessorService_SubmitOrder_InputMessage"/>
> > >         </wsdl:operation>
> > >         <wsdl:operation name="isOnline">
> > >              <wsdl:input wsaw:Action="isOnline"
> > > message="tns:OrderProcessorService_isOnline_InputMessage"/>
> > >         </wsdl:operation>
> > >     </wsdl:portType>
> > >
> > > since the Action SubmitOrder is defined in first operation it returns a
> > > wrong action when checking
> > >  for second operation. It should return null.
> > >
> > > Shall we remove this part?
> > >
> > > thanks,
> > > Amila.
> > >
> > > --
> > > Amila Suriarachchi,
> > > WSO2 Inc.
> >
> >
> >
> >
> >
> >
> > --
> > David Illsley - IBM Web Services Development
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> >
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.



-- 
David Illsley - IBM Web Services Development

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


Re: [Axis2] Getting axis2 operation from the service

Posted by Amila Suriarachchi <am...@gmail.com>.
On Thu, Apr 17, 2008 at 4:08 PM, David Illsley <da...@gmail.com>
wrote:

> Amila,
> As much as I'd lobe to remove this non-standard nonsense action
> processing, unfortunately it would break a lot of user applications,
> so I don't believe we can.


This means you also agrees this is a bug.  So we need to fix this. Because
this breaks some correct
wsdl file. If someone complain about this we have to fix that accordingly.

thanks,
Amila.

>
> David
>
> On Thu, Apr 17, 2008 at 7:14 AM, Amila Suriarachchi
> <am...@gmail.com> wrote:
> >
> > hi all,
> >
> > Have a look at the code in the AxisService getOperation method.
> > (AxisService.java 1613)
> >
> > if (axisOperation == null) {
> >             axisOperation = (AxisOperation) operationsAliasesMap
> >                     .get(operationName.getLocalPart());
> >
> >             if (LoggingControl.debugLoggingAllowed &&
> log.isDebugEnabled())
> >                 log.debug("Operations aliases map: " +
> > operationsAliasesMap);
> >         }
> >
> > Here it tries to get the operation assuming operation name local part is
> > equals to the action.
> >  Although this is a common practise it is not a spec requirement.
> >
> > As a result of this code it fails codegen for wsdls like this.
> >
> > <wsdl:portType name="OrderProcessorService">
> >         <wsdl:operation name="SubmitOrderTransactedQueue">
> >              <wsdl:input wsaw:Action="SubmitOrder"
> >
> >
> message="tns:OrderProcessorService_SubmitOrderTransactedQueue_InputMessage"/>
> >         </wsdl:operation>
> >         <wsdl:operation name="SubmitOrder">
> >              <wsdl:input wsaw:Action="SubmitOrderOnePhase"
> > message="tns:OrderProcessorService_SubmitOrder_InputMessage"/>
> >         </wsdl:operation>
> >         <wsdl:operation name="isOnline">
> >              <wsdl:input wsaw:Action="isOnline"
> > message="tns:OrderProcessorService_isOnline_InputMessage"/>
> >         </wsdl:operation>
> >     </wsdl:portType>
> >
> > since the Action SubmitOrder is defined in first operation it returns a
> > wrong action when checking
> >  for second operation. It should return null.
> >
> > Shall we remove this part?
> >
> > thanks,
> > Amila.
> >
> > --
> > Amila Suriarachchi,
> > WSO2 Inc.
>
>
>
> --
> David Illsley - IBM Web Services Development
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Re: [Axis2] Getting axis2 operation from the service

Posted by David Illsley <da...@gmail.com>.
Amila,
As much as I'd lobe to remove this non-standard nonsense action
processing, unfortunately it would break a lot of user applications,
so I don't believe we can.
David

On Thu, Apr 17, 2008 at 7:14 AM, Amila Suriarachchi
<am...@gmail.com> wrote:
>
> hi all,
>
> Have a look at the code in the AxisService getOperation method.
> (AxisService.java 1613)
>
> if (axisOperation == null) {
>             axisOperation = (AxisOperation) operationsAliasesMap
>                     .get(operationName.getLocalPart());
>
>             if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled())
>                 log.debug("Operations aliases map: " +
> operationsAliasesMap);
>         }
>
> Here it tries to get the operation assuming operation name local part is
> equals to the action.
>  Although this is a common practise it is not a spec requirement.
>
> As a result of this code it fails codegen for wsdls like this.
>
> <wsdl:portType name="OrderProcessorService">
>         <wsdl:operation name="SubmitOrderTransactedQueue">
>              <wsdl:input wsaw:Action="SubmitOrder"
>
> message="tns:OrderProcessorService_SubmitOrderTransactedQueue_InputMessage"/>
>         </wsdl:operation>
>         <wsdl:operation name="SubmitOrder">
>              <wsdl:input wsaw:Action="SubmitOrderOnePhase"
> message="tns:OrderProcessorService_SubmitOrder_InputMessage"/>
>         </wsdl:operation>
>         <wsdl:operation name="isOnline">
>              <wsdl:input wsaw:Action="isOnline"
> message="tns:OrderProcessorService_isOnline_InputMessage"/>
>         </wsdl:operation>
>     </wsdl:portType>
>
> since the Action SubmitOrder is defined in first operation it returns a
> wrong action when checking
>  for second operation. It should return null.
>
> Shall we remove this part?
>
> thanks,
> Amila.
>
> --
> Amila Suriarachchi,
> WSO2 Inc.



-- 
David Illsley - IBM Web Services Development

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