Adding Dev On Sun, May 7, 2017 at 3:17 PM, Indunil Upeksha Rathnayake <indu...@wso2.com > wrote:
> Hi, > > I have configured a workflow named "workflow1" in a tenant "tenant1.com" > to enable approval process for user creation in IS 5.3.0. When creating the > wokflow, an axis2 service is deployed named "workflow1TaskService". *In > the process of engaging the workflow in user creation, when the axis2 > service is invoked, it always calls the axis2 service through local > transport("local://axis2services/workflow1Service"), not through servlet > transport("https://localhost:9443/services/t/tenant1.com/workflow1TaskService > <https://localhost:9443/services/t/tenant1.com/workflow1TaskService>").* > Is there a way we can change to invoke axis2 service with https request? > Seems like can't achieve from changing the ServerUrl in carbon.xml. > > > As per the implementation, AFAIU, Workflow engagement request flow is as > follows. > > - From a workflow RequestExecutor we are calling an axis2 ServiceClient > - ServiceClinet passes the request to AxisEngine > - AxisEngine calls the MultitenantMessageReceiver to locate the tenant > specific axis configurations > - MultitenantMessageReceiver process the request message and invoke > the axis2 service > > When going through the flow, I found that *MultitenantMessageReceiver > changes the EndpointReference to use local transport > ("local://axis2services") and based on the property named "doingREST" which > is available in message context, it invokes the axis2 service through SOAP > or REST* ([1], [2]). > > When going through the axis2 implementation, found that the doingREST > property is set by either of the following ways. > 1) when initializing the message context, based on the content-type, it > sets the doingREST to "true" (if content type is "text/xml", doingREST= > false etc.) [3] > 2) If a property named "enableREST" in axis2 message context, it sets the > doingREST to "true" [4] > > As per the workflow implementation, when we are invoking the corresponding > axis2 service from the workflow request executor through an axis2 > ServiceClient, we set content type as "text/xml"[5] and endpoint reference > as https://localhost:9443/services/t/tenant1.com/workflow1TaskService[6]. > Even-though we put the https endpoint in the request from the > ServiceClient, through the axis2 engine it is not invoking this https > endpoint. > > *Can we change this "doingREST" property from a configuration? or it has > to be send request wise? Can this property be used to invoke axis2 service > through https transport? Is there any other way?* > > Appreciate your help on this. > > [2] https://github.com/wso2/carbon-kernel/blob/4.4.x/core/ > org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/multitenancy/ > MultitenantMessageReceiver.java#L232 > [3] https://github.com/wso2/carbon-kernel/blob/4.4.x/core/ > org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/multitenancy/ > MultitenantMessageReceiver.java#L260 > [4] https://github.com/wso2/wso2-axis2/blob/master/modules/ > transport/http/src/org/apache/axis2/transport/http/ > HTTPTransportUtils.java#L225 > [5] https://github.com/wso2/wso2-axis2/blob/master/modules/ > kernel/src/org/apache/axis2/transport/TransportUtils.java#L668 > [6] https://github.com/wso2-extensions/identity-workflow- > impl-bps/blob/master/components/org.wso2.carbon. > identity.workflow.impl/src/main/java/org/wso2/carbon/ > identity/workflow/impl/RequestExecutor.java#L143 > [7] https://github.com/wso2-extensions/identity-workflow- > impl-bps/blob/master/components/org.wso2.carbon. > identity.workflow.impl/src/main/java/org/wso2/carbon/ > identity/workflow/impl/RequestExecutor.java#L136 > > Thanks and Regards > > -- > Indunil Upeksha Rathnayake > Software Engineer | WSO2 Inc > Email indu...@wso2.com > Mobile 0772182255 > -- Indunil Upeksha Rathnayake Software Engineer | WSO2 Inc Email indu...@wso2.com Mobile 0772182255
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev