AnsweredAssumed Answered

Call custom HTTP Web Service in Workflow

Question asked by asurionsandip on Dec 21, 2015
Latest reply on Dec 28, 2015 by asurionsandip

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" ?>

- <wsp:Policy 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>
</wsp:Policy>
- <wsp:Policy wsu:Id="BasicHttpBinding_SysWorkflowApprovalService_policy">
+ <wsp:ExactlyOne>
</wsp:Policy>
<wsdl:types />
- <wsdl:binding name="serviceEndpoint" type="i0:IRequestReplyRouter">
<wsp:PolicyReference URI="#serviceEndpoint_policy" />
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
</wsdl:binding>
- <wsdl:binding name="BasicHttpBinding_SysWorkflowApprovalService" type="i1:SysWorkflowApprovalService">
<wsp:PolicyReference URI="#BasicHttpBinding_SysWorkflowApprovalService_policy" />
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="applyUrlAction">
- <wsdl:input name="SysWorkflowApprovalServiceApplyUrlActionRequest">
<soap:header message="i1:SysWorkflowApprovalServiceApplyUrlActionRequest_Headers" part="context" use="literal" />
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output name="SysWorkflowApprovalServiceApplyUrlActionResponse">
<soap:body use="literal" />
</wsdl:output>
- <wsdl:fault name="AifFaultFault">
<soap:fault name="AifFaultFault" use="literal" />
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="RoutingService">
- <wsdl:port name="serviceEndpoint" binding="tns:serviceEndpoint">
- <wsdl:port 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"/>

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

      <h:PropertyBag 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>

 

Outcomes