Troubleshooting
Problem
HTTPClientPostService has an error HTTPClientAdapter = [HttpClientAdapter_DynamicService] ServiceStartTime = [2012-12-07 09:03:01.528] ServiceEndTime = [2012-12-07 09:03:01.549] SessionToken = [HttpClientAdapter_DynamicService_HTTPClientAdapter_node1_13548889814715:14366] ErrorMessage = Http Client Exception: Internal Error: Couldn't send request via session [HttpClientAdapter_DynamicService_HTTPClientAdapter_node1_13548889814715:14366] due to state machine having previous failure [-1: Internal Error: Error reported during generateHeaders: [com.sterlingcommerce.woodstock.services.httpclient.HttpClientException: Invalid document body size after header extraction [-2]; make sure make sure request document contains proper headers.]]
Symptom
Attempts to post a document via the HTTP Client Adapter results in the error message:
HTTPClientPostService has an error
HTTPClientAdapter = [HttpClientAdapter_DynamicService]
ServiceStartTime = [2012-12-07 09:03:01.528]
ServiceEndTime = [2012-12-07 09:03:01.549]
SessionToken = [HttpClientAdapter_DynamicService_HTTPClientAdapter_node1_13548889814715:14366]
ErrorMessage = Http Client Exception:
Internal Error: Couldn't send request via session [HttpClientAdapter_DynamicService_HTTPClientAdapter_node1_13548889814715:14366] due to state machine having previous failure [-1: Internal Error: Error reported during generateHeaders: [com.sterlingcommerce.woodstock.services.httpclient.HttpClientException: Invalid document body size after header extraction [-2]; make sure make sure request document contains proper headers.]]
Cause
In an earlier step of this SOAP workflow, the Get Document Info service was run and the results were placed as a child of the root ProcessData. One of these nodes is called DocumentId. After more steps, the Primary Document changed. However, the HTTP Client POST Service takes DocumentId as a parameter, and that DocumentId no longer matches up with the headers that were generated by the SOAP services.
Diagnosing The Problem
If you receive this error in your HTTP Client POST service, look for a <DocumentId> node as a direct child of ProcessData.
Resolving The Problem
There are multiple ways of dealing with this.
1. Release the DocumentId node just before the HTTP Client Adapter
steps:
<operation name="ReleaseDocumentId">
<participant name="ReleaseService" />
<output message="outmsg">
<assign to="TARGET">DocumentId</assign>
</output>
<input message="outmsg">
</input>
</operation>
or
2. In the initial GetDocInfo, output the results to a child node of
ProcessData rather than the root:
<operation name="Get Document Information Service">
<participant name="GetDocumentInfoService"/>
<output message="GetDocumentInfoServiceTypeInputMessage">
<assign to="." from="*"></assign>
</output>
<input message="inmsg">
<assign to="DocInfo" from="*"></assign>
</input>
</operation>
3. A third alternative is to run Get Document Info again just
before the HTTP Client Adapter steps so that current information on the
PrimaryDocument is loaded into ProcessData.
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21619827