goetas-webservices/geis-group-cz-client

1.0.0 2018-11-16 10:40 UTC

This package is auto-updated.

Last update: 2024-09-16 23:36:00 UTC


README

本项目提供了一个用于Geis Group Shipment客户端API的SOAP客户端

更多信息可以访问 https://www.geis-group.cz/en

安装

推荐使用 Composer 安装 goetas-webservices/geis-group-cz-client,只需运行

composer require goetas-webservices/geis-group-cz-client

功能

  • 纯PHP,不依赖于 ext-soap
  • 完全支持IDE类型提示
  • PSR-7 HTTP消息兼容
  • 多HTTP客户端(guzzle、buzz、curl、react)
  • 生产环境中不解析WSDL/XSD
  • 可扩展(支持事件监听器)

使用说明

<?php

use GoetasWebservices\SoapServices\SoapClient\ClientFactory;
use GoetasWebservices\SoapServices\SoapClient\Builder\SoapContainerBuilder;
use GoetasWebservices\Client\GeisGroupCz\SoapContainer;
use GoetasWebservices\Client\GeisGroupCz\SoapStubs\IGService;

require __DIR__ . '/vendor/autoload.php';

// project initialization
$container = new SoapContainer();

// use this when cloning this repository and keeping the directory, comment it when including goetas-webservices/geis-group-cz-client via composer
$serializer = SoapContainerBuilder::createSerializerBuilderFromContainer($container)->build();

// uncomment this when including goetas-webservices/geis-group-cz-client via composer
// $serializer = SoapContainerBuilder::createSerializerBuilderFromContainer($container, null, __DIR__ . '/vendor/goetas-webservices/geis-group-cz-client')->build();

$metadata = $container->get('goetas_webservices.soap_client.metadata_reader');
$factory = new ClientFactory($metadata, $serializer);

/**
 * @var $client IGService
 */
$client = $factory->getClient('https://gclient.geis.cz/GService/GService.svc?singlewsdl','BasicHttpBinding_IGService', 'GService');


$result = $client->shipmentDetail(/* put here your params */);

var_dump($result);

注意

本项目代码遵循 MIT 许可。如需专业支持请联系 goetas@gmail.com 或访问 https://www.goetas.com