2012-08-14 32 views
0

我无法使用mule中的restful服务从@QueryParam中读取xml值。如何在平稳的web服务中将xml值作为queryparam读取

@Path("/hello") 
public class Resttest { 
@GET 
@Produces("text/xml") 
public String sayHelloWithUri(@QueryParam("body") String g) { 
System.out.println("............................wdwedfwfw2"+g); 
return g; 
} 

请求XML:HTTP:// < MYDOMAIN>:???8080 /球衣/你好/体= < XML版本= “1.0” 编码= “UTF-8”> <选项> <选项>汽车< /选项> <选项>自行车< /选项> < /选项>

回答

0

什么是你正在使用Mule配置?

它的工作原理与此一:

<flow name="TesstFlow"> 
    <http:inbound-endpoint address="http://localhost:8080/jersey/" method="GET" /> 
    <jersey:resources> 
     <component class="Resttest" /> 
    </jersey:resources> 
    <logger level="WARN"/> 
</flow>