Question
· Oct 11, 2017

How to create a web service that receives a stream data type

Hi Community,

 

Has anyone ever set up a web service that takes a stream data type as an argument? The client will be dotNet.

 

This is the error I see:-

 

   <SOAP-ENV:Fault>
      <faultcode>SOAP-ENV:Client</faultcode>
      <faultstring>Badly formed SOAP Message</faultstring>
      <detail>
    <error xmlns='http://soap.rmh.nhs.uk'>
     <text>ERROR #5002: Cache error: &lt;INVALID OREF&gt;XMLLOOP+9^WebService.eDCGold.GetRootKeyLocalRef.1</text>
    </error>
</detail>
    </SOAP-ENV:Fault>

I have switched to a string data type for now and that is working fine. However it could be >32k so I would prefer to use a stream.

Cheers

Mike

Discussion (2)1
Log in or sign up to continue

I have received a stream before as follows in my WebService client:

Method MyWebMethod(pAction As %String = "",  ByRef pFile As %FileCharacterStream = "", ByRef pDataSet As %XML.DataSet = "") As %xsd.base64Binary [ Final, ProcedureBlock = 1, SoapBindingStyle = document, SoapBodyUse = literal, WebMethod ]
{
...

}

I am able to use this method signature to both receive files from the web service as well as send files to the web service.

Hope that helps!

Ben