douqiang6448 2014-05-14 08:24
浏览 66

如何使Zend Soap Server自动发现基本的xsd类型?

I am working on the Zend-framework-based Soap server, using AutoDiscovery to create wsdl file. It works all right for the either basic integers and strings or complex types based on these two primitives. However, I am unable to define my variables as date type

Here is an example data file

<?php
namespace Soap;
class Data_Object_Period
{
    /** @var string */
    public $EndDate;
}

if I make it string, it in a wsdl file it looks like

<xsd:element name="EndDate" type="xsd:string" nillable="true"/>

But if I make it date, I get an error

Cannot add a complex type date that is not an object or where class could not be found in "DefaultComplexType" strategy.

How can I add standard xsd date type to AutoDiscover strategy?

  • 写回答

1条回答 默认 最新

  • dongsu1951 2014-07-31 12:20
    关注

    You didn't specify the ZF version you're using, but I believe the answer should be the same. The WSDL Auto Discovery doesn't support date types, as you can see here:

    http://framework.zend.com/manual/1.12/en/zend.soap.autodiscovery.html

    Scroll down to Autodiscovering Datatypes. I suggest you keep on using it as string and then verify if it is a valid date in the function.

    评论

报告相同问题?

悬赏问题

  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏