+1
Résolu
Httpmethod and text template to call web services
Are there details for the httpmethod attribute for the datasource tag? The documentation just has a "?" :)
Also, an example of using httpmethod in combination with texttemplate to call a webservice would be great!
Also, an example of using httpmethod in combination with texttemplate to call a webservice would be great!
Service d'assistance aux clients par UserEcho
Text templates are very powerful. All rarewire bracketed objects ( eg. [var:stuff] ) are evaluated when you access the 'content' property of the TT ( [template:mycontent.content] )
With the use of the
<httpheader> <datasource> <textemplate>
, this simple can be extended to a full soap service client.Below is the foundation of how it works:
<wire>
<datasources>
<datasource name="jsonservice" source="" query="/" providertype="json" querycomplete="response" httpmethod="post"/>
</datasources>
<main>
<texttemplate name="mycontent"><![CDATA[{ "firstname" : "john" , "lastname":"Smith" }]]></texttemplate>
</main>
<actions>
<action name="start" oninit="yes">
<sync>
<assign property="datasource:jsonservice.postContent" value="[template:mycontent.content]" />
<assign property="datasourcejsonservice.source" value="http://myserver.com/name" />
</sync>
</action>
<action name="response">
<alert message="[datasource:jsonservice.1.status]"/>
</action>
</actions>
</wire>
If you have a server you have setup and can verify the requests coming to it, we can help you put together a working example. Feel free to send Ian the details and we help you get a prototype running.