Hi all, I'm trying to create a backend service which gives application/rdf+xml responses. I'm using API element.
<api xmlns="http://ws.apache.org/ns/synapse" name="test" context="/test"> <resource methods="GET" url-mapping="/rdf"> <inSequence> <header name="To" action="remove"/> <property name="RESPONSE" value="true"/> <property name="NO_ENTITY_BODY" scope="axis2" action="remove"/> <payloadFactory> <format> * <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns# <http://www.w3.org/1999/02/22-rdf-syntax-ns#>" xmlns:feature="http://www.linkeddatatools.com/clothing-features# <http://www.linkeddatatools.com/clothing-features#>">* * <rdf:Description rdf:about="http://www.linkeddatatools.com/clothes#t-shirt <http://www.linkeddatatools.com/clothes#t-shirt>">* * <feature:size>12</feature:size>* * <feature:color rdf:resource="http://www.linkeddatatools.com/colors#white <http://www.linkeddatatools.com/colors#white>"/>* * </rdf:Description>* * </rdf:RDF>* </format> </payloadFactory> <property name="messageType" value="application/rdf+xml" scope="axis2" type="STRING"/> <property name="ContentType" value="application/rdf+xml" scope="axis2" type="STRING"/> <log level="full"/> <send/> </inSequence> </resource> </api> I have added following to axis2.xml <messageFormatter contentType="application/rdf+xml" class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/> <messageBuilder contentType="application/rdf+xml" class="org.apache.axis2.builder.ApplicationXMLBuilder"/> Now, when I send *GET http://localhost:8280/test/rdf <http://localhost:8280/test/rdf> *I get the proper response as follows but it deos not have the *Content-Type* header. <rdf:RDF> <rdf:Description rdf:about="http://www.linkeddatatools.com/clothes#t-shirt" > <feature:size> 12 </feature:size> <feature:color rdf:resource="http://www.linkeddatatools.com/colors#white" /> </rdf:Description> </rdf:RDF> Accept-Language: en-US,en;q=0.8,si;q=0.6 Host: localhost:8280 Accept-Charset: UTF-8,*;q=0.5 Accept-Encoding: gzip,deflate,sdch Accept: application/rdf+xml Date: Tue, 04 Mar 2014 13:03:54 GMT Server: WSO2-PassThrough-HTTP Transfer-Encoding: chunked Connection: keep-alive Is there anything I'm missing here? Thanks, -- *Bhathiya Jayasekara* *Software Engineer,* *WSO2 inc., http://wso2.com <http://wso2.com>* *Phone: +94715478185* *LinkedIn: http://www.linkedin.com/in/bhathiyaj <http://www.linkedin.com/in/bhathiyaj>* *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>* *Blog: http://movingaheadblog.blogspot.com <http://movingaheadblog.blogspot.com/>*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
