On 6/7/2012 17:29, PaulZH wrote:
Hi Holger and Scott,

As you suggested I monitored what's sent over and this is what I did
found out:

User-Agent: TopBraidComposerME/3.6.0
Content-Type: application/x-www-form-urlencoded<<-- I need
application/xml
Host: xxx
Content-Length: 50

And the POST body is, as could be expected in the shape of form key/
value pairs.

contentType=application%2Fxml&content=%7B%3Fxml%7D

Any suggestion to get the correct Content-Type?

Based on the documentation
"By default, the request will not include any variable bindings. In
order to pass in any other parameters, you need to subclass the
sml:PostRequest class and declare the additional arguments as
spin:constraints."
I subclassed the sml:PostRequest and added sml:content and
sml:contentType as spin:constraints but then they show up twice in the
debugger and the result is the same.

Yes, I looked into this and found out that the module accidentally turns contentType and content into name-value pairs, and if any such parameter is present then the Java class wraps the whole request into a application/x-www-form-urlencoded request. I have added code that suppresses sml:contentType and sml:content to be treated as (redundant) parameters and now it produces a post with the specified content-type (unless you have defined any other parameters explicitly). This fix will go into 3.6.1. Please contact me if you are blocked by this limitation until then.

Thanks
Holger

--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to