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.

Paul

On Jun 7, 1:15 am, Holger Knublauch <[email protected]> wrote:
> On 6/7/2012 0:11, PaulZH wrote:
>
>
>
>
>
>
>
> > I want to achieve from within TBCME the similar as using curl:
>
> > curl $URL --data-binary @$f -H 'Content-type:application/xml'
> > where $f refers to XML files.
>
> > I have following situation in my SPARQLMotion script as seen in the
> > debugger
>
> > Argument sml:content (xsd:string) : (S)<add>..<!-- more XML-->  ..</
> > add>
> > Argument sml:contentType (xsd:string): (S) application/xml
> > Argument sml:outputVariable (xsd:string): (S) response
> > Argument sml:url (xsd:string) (S)http://www.etc...
>
> > Using these arguments the external Tomcat server running Solr throws
> > following error:
> > HTTP Status 400 - missing content stream.
>
> > What am I overlooking?
>
> Hi Paul,
>
> looks good to me, and I am not aware of open bugs for sml:PostRequest.
> You could probably check what's going out with a network monitor such as
> Http Debugger to see what request actually goes out. The error could for
> example be on the receiving end?
>
> 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