enunciate를 사용하여 문서화 된 REST 서비스가 있습니다. 내 엔드 포인트는 application/xml 출력을 제공하지 않습니다. 여전히 여기에 비슷한 문서가 있습니다 : http://enunciate.codehaus.org/wannabecool/step4/el_persona_persona.html (예제 XML) 및 여기 : http://enunciate.codehaus.org/wannabecool/step4/persona_persona.html (XML 특성).enunciate에서 XML 예제 및 XML 문서 비활성화
나는 JSON 출력으로 서비스만을 제공한다. (왜 내게 묻지는 말고 내 결정이 아니다.) 따라서 인터페이스 사용자에게 XML 데이터로 인터페이스를 사용할 수 있다고 제안 할 것이므로 XML 출력이 필요하지 않습니다.
아래에서 내 enunciate.xml을 찾을 수 있습니다. 당신은 이미 내용 만-유형의 콘텐츠 형식 응용 프로그램/JSON을 넣어 및 = XML/비활성화 사실 넣어 XML 생성을 해제하려고 것을 볼 수 있습니다
<?xml version="1.0" encoding="UTF-8"?>
<enunciate label="blubb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.28.xsd">
<deployment protocol="https" host="blubb" context="blubbService/v1"/>
<namespaces>
<namespace id="api" uri="https://blubb.com/blubbService/v1/"/>
</namespaces>
<services>
<rest>
<content-types>
<content-type type="application/json" id="json" />
</content-types>
</rest>
</services>
<modules>
<docs splashPackage="blubbService.api" title="blubb API" copyright="blubb"/>
<jersey useSubcontext="false" usePathBasedConneg="false"/>
<xml disabled="true"/>
<jaxws disabled="true" />
<jaxws-client disabled="true" />
<jaxws-ri disabled="true" />
</modules>
</enunciate>
어떻게 제대로 XML 문서를 비활성화 할 수 있습니까?
당신이 (당신의 대답에)이 코드를 설명해 주시겠습니까? 당신은 더 많은 upvotes 그런 식으로 얻을 수 있습니다! –