0

ミュールで安静なサービスを使用して @QueryParam から xml 値を読み取ることができません。

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

request xml : http://< mydomain>:8080/jersey/hello/?body=< ?xml version="1.0" encoding="UTF-8" ?>< Options>< Option>car< /Option>< Option >バイク< /オプション>< /オプション>

4

1 に答える 1

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> 
于 2012-08-15T16:35:18.163 に答える