Home My Page Projects Code Snippets Project Openings DPWS Core
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files Mediawiki

[#414] MTOM file transfer mail fail with mime type different from NULL

Date:
2015-01-07 09:59
Priority:
3
State:
Open
Submitted by:
Antoine Hincelin (ahincelin)
Assigned to:
Stéphane ROUGES (srouges)
Target Fix Version:
none
Product:
DPWS Core
Operating System:
All
Component:
none
Version:
v2.5.1
Severity:
minor
Resolution:
Fixed
Hardware:
none
URL:
Summary:
MTOM file transfer mail fail with mime type different from NULL

Detailed description
If type element in struct _xop__Include is set to value different from NULL, then transfer mail fail.

For example, I modified "Hello" application, replacing in server.c (l.1090)
prj__Image->Param.type = NULL;
by
prj__Image->Param.type = "application/octet-stream";

When invoking client with command "GetLastImage" on device "Home Cinema Projector", using data in attachment, I got a SOAP error.

Logs are provided in attachment as well.
Message  ↓
Date: 2015-01-09 08:19
Sender: Antoine Hincelin

Thanks!

BR
Antoine

Date: 2015-01-08 16:30
Sender: Stéphane ROUGES

I think I fixed the issue and it was more subtle than I initially thought. It occurs when the file contains or end with EOL happening at SOAP_BLOCKLEN boundary (256 by default). The bug was present in gSOAP 2.7.6e.
Fix has been commited in trunk.

Date: 2015-01-08 14:07
Sender: Stéphane ROUGES

Seeems to occur when an EOL ends the attachement (which is unlikely in real binaries).
Bug identified and was present if the original version of gSOAP (2.7.6) on which DPWSCore is based. Later are however too different for simple retrofit.
A fix is being searched.

Date: 2015-01-08 09:14
Sender: Antoine Hincelin

data2.zip file in attachment

Date: 2015-01-08 09:11
Sender: Antoine Hincelin

You're right, it is "Home" sample I want to talk about.
In fact, we got a problem about MTOM transfer in our application and I wanted to reproduce it in a sample.

In "Home" sample, if I uncomment soap_set_mode( ... MTOM ... ), the problem is still here.

It appears with some data files only, not all. (special char on specific location?)
I join another file in attachment (data2.zip) with which:
- transfer fails when type is not NULL,
- transfer is successful when type is NULL.

Date: 2015-01-08 08:40
Sender: Stéphane ROUGES

Hi,
Are you using the "Home" sample ? Indeed, I could verify what you experienced but I also found the reason: I don't know why but the line:
soap_set_mode(&master_dpws.soap, SOAP_ENC_MTOM);
has been commented a long time ago... If you uncomment it, it works.
Could you confirm it was your issue so I could close the bug (committed in trunk).
BR,
Stéphane

Attachments:
Size Name Date By Download
2 KiBdata.zip2015-01-07 09:59ahincelindata.zip
45 KiBlogs.zip2015-01-07 09:59ahincelinlogs.zip
2 KiBdata2.zip2015-01-08 09:14ahincelindata2.zip
Field Old Value Date By
ResolutionAccepted As Bug2015-01-08 16:30srouges
ResolutionFixed2015-01-08 14:07srouges
File Added65: data2.zip2015-01-08 09:14ahincelin
assigned_tonone2015-01-08 08:40srouges
ResolutionNone2015-01-08 08:40srouges
File Added63: data.zip2015-01-07 09:59ahincelin
File Added64: logs.zip2015-01-07 09:59ahincelin