POST 메서드를 사용하여 공개적으로 액세스 할 수있는 API (https://ABCInsuranceCoreApp.ng.bluemix.net/ABCInsurance/ProductService)에 액세스해야합니다.Apigee - Apigee API 개발 플랫폼을 사용하여 POST 메서드를 사용하여 XML 페이로드를 보내는 방법
<Customer>
<Age>40</Age>
<Gender>M</Gender>
<Location>IBM</Location>
</Customer>
의 XML Payload를 승인하고 제품 목록을 리턴합니다. API는 REST-Client에서 작동하며 테스트되었습니다.
Apigee API Dev Platform에서 수행 한 작업은 다음과 같습니다.
기본 ProxyEndpoint :
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ProxyEndpoint name="default">
<Flows>
<Flow name="default">
<Request>
<Step>
<Name>AssignCustomerData</Name>
</Step>
<Step>
<Name>ExecuteProductService</Name>
</Step>
</Request>
<Response>
<Step>
<Name>ParseProductList</Name>
</Step>
</Response>
</Flow>
</Flows>
<HTTPProxyConnection>
<BasePath>/v1/abcinsproductservice</BasePath>
<VirtualHost>default</VirtualHost>
</HTTPProxyConnection>
<RouteRule name="default"/>
</ProxyEndpoint>
AssignCustomerData는 AssignMessage 정책이며 ..
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AssignMessage async="false" continueOnError="false" enabled="true" name="AssignCustomerData">
<DisplayName>AssignCustomerData</DisplayName>
<AssignTo createNew="true" type="request">CustomerData</AssignTo>
<Set>
<Payload contentType="text/xml">
<Customer>
<Age>40</Age>
<Gender>M</Gender>
<Location>IBM</Location>
</Customer>
</Payload>
<Verb>POST</Verb>
</Set>
</AssignMessage>
ExecuteProductService이 서비스 콜 아웃이며 모습 .. 같은
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ServiceCallout async="false" continueOnError="false" enabled="true" name="ExecuteProductService">
<!-- Send the message we just made to the target, and save the result -->
<Request variable="CustomerData"/>
<Response>ProductList</Response>
<HTTPTargetConnection>
<URL>https://ABCInsuranceCoreApp.ng.bluemix.net/ABCInsurance/ProductService</URL>
</HTTPTargetConnection>
</ServiceCallout>
를 찾습니다 ParseProductList는 다음과 같은 ExtractVriable 정책입니다.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ExtractVariables async="false" continueOnError="false" enabled="true" name="ParseProductList">
<DisplayName>ParseProductList</DisplayName>
<FaultRules/>
<Properties/>
<VariablePrefix>products</VariablePrefix>
<XMLPayload>
<Variable name="name" type="string">
<XPath>//Products/Product[1]/Name</XPath>
</Variable>
</XMLPayload>
</ExtractVariables>
나는 샘플을 조심스럽게 따라 갔지만, 배열은 효과가 없다. 나는 그 오류가 어디에 있는지 혼란 스럽다. 추적 사전에
많은 감사합니다 .. 하나 .. 당신이 PLS 도와 줄래 작동하지 Amitava