<?php
/*
 * Copyright (c)  2006-2008 Maskat Project.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/* 要求メッセージを解析し、パラメータ配列へ格納する */
require_once("../lib/maskat.php");
$param = parse_request_xml();

/* 顧客情報を検索 */
require_once("./common.php");
$customer = find_customer($param["customerId"]);

/* 応答メッセージを出力 */
header("Content-Type: text/xml;charset=UTF-8");
echo '<?xml version="1.0" encoding="UTF-8"?>';
?>
<response>
  <id><?php echo $customer["id"]; ?></id>
  <name><?php echo $customer["name"]; ?></name>
  <phone><?php echo $customer["phone"]; ?></phone>
  <fax><?php echo $customer["fax"]; ?></fax>
  <zip><?php echo $customer["zip"]; ?></zip>
  <address><?php echo $customer["address"] ?></address>
  <contactPerson><?php echo $customer["contact_person"]; ?></contactPerson>
</response>
