cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Call custom HTTP Web Service in Workflow

I got custom web service from my client. I have to consume this service in Workflow and post some data to that service and read the response.

 

How do I do this?

Which action "Call web service" or "Web request" I use here?

 

Service URL http://wnpnprdxwst070v.int.as.com:85/MicrosoftDynamicsAXAif60/Sysworkflow/xppservice.svc?wsdl    

 

This is what I get when I click on above URL

 

<?xml version="1.0" encoding="utf-8" ?>

- <wspSmiley Tongueolicy wsu:Id="serviceEndpoint_policy">
- <wsp:ExactlyOne>
- <wsp:All>
<http:NegotiateAuthentication xmlns:http="http://schemas.microsoft.com/ws/06/2004/policy/http" />
</wsp:All>
</wsp:ExactlyOne>
</wspSmiley Tongueolicy>
- <wspSmiley Tongueolicy wsu:Id="BasicHttpBinding_SysWorkflowApprovalService_policy">
+ <wsp:ExactlyOne>
</wspSmiley Tongueolicy>
<wsdl:types />
- <wsdl:binding name="serviceEndpoint" type="i0:IRequestReplyRouter">
<wspSmiley TongueolicyReference URI="#serviceEndpoint_policy" />
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
</wsdl:binding>
- <wsdl:binding name="BasicHttpBinding_SysWorkflowApprovalService" type="i1Smiley FrustratedysWorkflowApprovalService">
<wspSmiley TongueolicyReference URI="#BasicHttpBinding_SysWorkflowApprovalService_policy" />
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdlSmiley Surprisedperation name="applyUrlAction">
- <wsdl:input name="SysWorkflowApprovalServiceApplyUrlActionRequest">
<soap:header message="i1Smiley FrustratedysWorkflowApprovalServiceApplyUrlActionRequest_Headers" part="context" use="literal" />
<soap:body use="literal" />
</wsdl:input>
- <wsdlSmiley Surprisedutput name="SysWorkflowApprovalServiceApplyUrlActionResponse">
<soap:body use="literal" />
</wsdlSmiley Surprisedutput>
- <wsdl:fault name="AifFaultFault">
<soap:fault name="AifFaultFault" use="literal" />
</wsdl:fault>
</wsdlSmiley Surprisedperation>
</wsdl:binding>
- <wsdl:service name="RoutingService">
- <wsdlSmiley Tongueort name="serviceEndpoint" binding="tns:serviceEndpoint">
- <wsdlSmiley Tongueort name="BasicHttpBinding_SysWorkflowApprovalService" binding="tns:BasicHttpBinding_SysWorkflowApprovalService">
</wsdl:service>
</wsdl:definitions>

 

POST SOAP message provided by the client,


<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

  <s:Header>

    <h:CallContext xmlns:h="http://schemas.microsoft.com/dynamics/2010/01/datacontracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

      <h:Company>MS</h:Company>

      <h:Language i:nil="true"/>

      <h:LogonAsUser i:nil="true"/>

      <h:MessageId i:nil="true"/>

      <hSmiley TongueartitionKey i:nil="true"/>

      <hSmiley TongueropertyBag i:nil="true" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>

    </h:CallContext>

  </s:Header>

  <s:Body>

    <SysWorkflowApprovalServiceApplyUrlActionRequest xmlns="http://schemas.microsoft.com/dynamics/2011/01/services">

      <_action>Approve</_action>

      <_workItem>1f57ac04-b661-4991-89f5-6acdfe1cc69a</_workItem>

      <_userId>userId</_userId>

      <_workflowComment/>

    </SysWorkflowApprovalServiceApplyUrlActionRequest>

  </s:Body>

</s:Envelope>

 

Labels: (1)
0 Kudos
Reply
4 Replies
Workflow Hero

Re: Call custom HTTP Web Service in Workflow

I would try to use the call web service action as first port of call.. You can then use the soap wizard to help post the parameters etc.. If not you can edit directly in soap.

If this doesn't work try the "Web Request" action. this is a little more flexible..

0 Kudos
Accept as Solution Reply
Not applicable

Re: Call custom HTTP Web Service in Workflow

Can you please provide me the "Call Web Service" or "Web Request" action configuration?

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Call custom HTTP Web Service in Workflow

here is a guide on how to use the "Call Web Service" Action How to use the Call Web Service action

This is quick look at the Web Request Action Nintex Workflow - Web Request action 101 - Vadim Tabakman It is for an older version of Nintex but it is still relevant.

0 Kudos
Accept as Solution Reply
Not applicable

Re: Call custom HTTP Web Service in Workflow

Issue solved. Please find details below.

 

Web Request Action Configuration

wr.jpg

 

Configurations are as follows,

 

URL

http://wnpnprdxwst070v.int.as.com:85/MicrosoftDynamicsAXAif60/Sysworkflow/xppservice.svc?wsdl

 

SOAP Action

http://schemas.microsoft.com/dynamics/2011/01/services/SysWorkflowApprovalService/applyUrlAction

 

POST SOAP message

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

  <s:Header>

    <h:CallContext xmlns:h="http://schemas.microsoft.com/dynamics/2010/01/datacontracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

      <h:Company>MS</h:Company>

      <h:Language i:nil="true"/>

      <h:LogonAsUser i:nil="true"/>

      <h:MessageId i:nil="true"/>

      <hSmiley TongueartitionKey i:nil="true"/>

      <hSmiley TongueropertyBag i:nil="true" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>

    </h:CallContext>

  </s:Header>

  <s:Body>

    <SysWorkflowApprovalServiceApplyUrlActionRequest xmlns="http://schemas.microsoft.com/dynamics/2011/01/services">

      <_action>Approve</_action>

      <_workItem>1f57ac04-b661-4991-89f5-6acdfe1cc69a</_workItem>

      <_userId>userId</_userId>

      <_workflowComment/>

    </SysWorkflowApprovalServiceApplyUrlActionRequest>

  </s:Body>

</s:Envelope>

0 Kudos
Accept as Solution Reply