Posting an xml file to TN with content-type=application/octet-stream

I’m using a 3rd party control that captures data and puts in into an XML file with the content type=application/octet-stream. I’m unable to change the content type. When I post the file to TN:receive it does not register. I’m able to pass the file to a .NET Function and then submit it to wM but I want to remove the .NET Function. Any suggestions on how I can get wM TN or a service to receive the post? Below is the Header of the post that I can capture in .NET.

POST /Default.aspx?TabId=618 HTTP/1.1
Connection: Keep-Alive
Content-Length: 2226
Content-Type: multipart/form-data; boundary=d6892121cab84ffeae17444c232a19a5
Expect: 100-continue
Host: princtn-w3008

–d6892121cab84ffeae17444c232a19a5
Content-Disposition: form-data; name=“postedfile”; filename=“FormData.xml”
Content-Type: application/octet-stream

Thanks,

Kevin

Kevin,

Alternative is post the xml string to a custom service and let it post to TN using routeXML or receive service.This way you will have a chance to send the required content type of TN.

HTH,
RMG

RMG - When I attempt to post to a service I’m unable to capture the file. My first step is SaveToPipeline but it doesn’t pick up the attached file. Any suggestions on how to setup a service to receive an attached file with Content-Type: application/octet-stream?

-Thanks Kevin

Use getTransportInfo and savepipeline under it and check the pipeline.But you cant see the streams saving though atleast you will get some good info.

Also your service input should be contentStream (object) and use streamToBytes and bytesToString(extract xml data) and route this to TN.

HTH,
RMG

Hi,

Not sure whether I am making any sense, but can you try to post that to MIME services and getContentType and bodyPart of your message.

Convert that message to an IDOC and post it to TN.

Thanks,
Srivats

Kevin,

I think you need to register a content handler for Application/Octet-stream. There are samples in WmSamples. Whether you can submit directly to TN or going though a 3rd service, sorry, not too sure… Give it a try.

I was able to fix this by running sample.contentHandler:registerContentHandler service and using application/octet-stream as my input. The next time I posted the file to the service I was able to retreive it with contentSteam. The string contained the xml file that I needed. I had to remove some extra characters from it but I was able to get it to work.

Thank-you everyone for all of your help,

Kevin

Glad you resolved the problem by your self.

yes input contentStream should do the trick…But IS4.6/6.x can handle stream inputs(contentStream objects) by default.

HTH,
RMG