- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
目前我使用的是 PHP 版本 5.4.16 和 NuSoap 0.95,我试过这个例子: here
它显示了这样的服务器代码;
$server->wsdl->addComplexType(
'Chapter',
'complexType',
'struct',
'all',
'',
array(
'title' => array('name'=>'title','type'=>'xsd:string'),
'page' => array('name'=>'page','type'=>'xsd:int')
)
);
$server->wsdl->addComplexType(
'ChapterArray',
'complexType',
'array',
'',
'SOAP-ENC:Array',
array(),
array(
array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:Chapter[]')
),
'tns:Chapter'
);
$server->wsdl->addComplexType(
'Book',
'complexType',
'struct',
'all',
'',
array(
'author' => array('name'=>'author','type'=>'xsd:string'),
'title' => array('name'=>'title','type'=>'xsd:string'),
'numpages' => array('name'=>'numpages','type'=>'xsd:int'),
'toc' => array('name'=>'toc','type'=>'tns:ChapterArray')
)
);
$server->register(
'getBook',
array('title'=>'xsd:string'),
array('return'=>'tns:Book'),
$NAMESPACE);
function getBook($title) {
// Create TOC
$toc = array();
$toc[] = array('title' => 'Chapter One', 'page' => 1);
$toc[] = array('title' => 'Chapter Two', 'page' => 30);
// Create book
$book = array(
'author' => "Jack London",
'title' => $title,
'numpages' => 42,
'toc' => $toc);
return $book;
}
但在 SOAP 响应中返回错误,我正在使用 SopUI 对其进行测试。我收到这样的错误:
<br />
<b>Notice</b>: Array to string conversion in <b>E:\xampp\htdocs\myweb\lib\nusoap.php</b> on line <b>6132</b><br />
<br />
<b>Notice</b>: Array to string conversion in <b>E:\xampp\htdocs\myweb\lib\nusoap.php</b> on line <b>6132</b><br />
<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getBookResponse xmlns:ns1="http://localhost/myweb"><return><author>Jack London</author><title>This is my book</title><numpages>42</numpages><toc><item><title>Chapter One</title><page>1</page></item><item><title>Chapter Two</title><page>30</page></item></toc></return></ns1:getBookResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
我该如何解决这个错误?有人可以帮我解决这个错误吗...非常感谢...
最佳答案
在 nusoap > lib > nusoap.php
中,注释行 6132:
////$this->debug("serializing array element: $k, $v of type: $typeDef[arrayType]");
关于php - 如何处理 NuSoap 中的数组 ComplexType?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18779953/
该XSD部分是从http://www.iana.org/assignments/xml-registry/schema/netconf.xsd获得的
我遇到了这个列表 W3C XML Schema: DOs and DON'Ts和说 DO NOT use complex types 的部分有点让我吃惊。 我在使用 时没有发现任何问题我不明白为什么
到一个简单的元素 type="xs:int"我想添加一个限制和一些属性。但是,我看到的唯一方法是分两步: 声明一个命名(全局)类型并将所有限制放在命名类型中 引用base中的命名类型的 并将属性添加到
我在架构中有以下内容: 一些解析器允许直接在元素中使用 PCDATA,而另一些则不允许。 XSD 推荐 (3.4.2)
我在以下类(class)中收到以下错误: 无法序列化 DataObjects.Ingredient 类型的成员“成分”。 XmlAttribute/XmlText 不能用于编码复杂类型。 关于为什么的
我想知道为什么不用写 我不能指定它是 xs:complexType 的元素属性吗?或者是否有 xs:superSecretThingIdontKnow
我最近更新到 Breezejs 1.4.2,运行自定义初始值设定项似乎存在问题。我的应用程序使用 Breeze 正确注册了 ctor 和初始化程序(我相信),但是当我从 Entity Framewor
当使用XML Schema声明一个complexType只有一个子元素时,以下三种方式都可以达到目的: 显然,sequence、choice
我有一个类似于此示例的 xml 文档(和复杂元素): 但是在我的 xml 中,我是先添加名字还是姓氏并不重要。所以我想删除“xs:sequence”部分,但我不
目前我使用的是 PHP 版本 5.4.16 和 NuSoap 0.95,我试过这个例子: here 它显示了这样的服务器代码; $server->wsdl->addComplexType( '
我刚刚读了一本关于网络服务的书,上面说有“RPC 风格的网络服务”和“文档风格的网络服务”。第二个是在 WSDL 序列和复杂类型中使用。我什么时候应该使用这种风格? 最佳答案 当您想要将联系人、消息或
我自动生成 XML 架构,生成的 xsd 文件是根据百叶窗设计模式创建的。现在我有很多复杂的类型,并且想减少它们的数量。有没有一种简单的方法可以确定两个复杂类型是否描述相同的限制? 这是一个向您展示我
我正在尝试使用包含以下 XSD 的 WCF 使用服务(用 Java 构建和托管) 当我从该服务请求数据时,出现以下错误: "Base64 sequence length (1) no
我对 EntityFramework 的 Code First 方法相当陌生,当我尝试创建引用实体类型的可重用复杂类型时遇到以下错误。 模型: class Bank { public int
我正在使用 Jdeveloper 12c。我正在尝试使用 complexType 作为在另一个 complexType 中键入另一个元素的引用。 Jdev 告诉我它找不到 AddressInfo 引用
我有这个 xsd,它有点糟糕,但我必须使用它来避免更改我正在编写的 servlet 的接口(interface)。请求-响应接口(interface)的 xsd 包含以下几行:
这
我有一个服务器 (SoapUI) 响应 WSDL 请求。 当发送测试请求时,我的服务器代码正在接收参数的列表,但我试图实现的是单个参数,复杂类型,例如: { ingredient_id => I
例子如下。请让我知道同名的副作用。我正在尝试从此 XSD 创建 Java 对象模型。
如何及时插入具有复杂类型的多个实体? 考虑以下几点: public class Entity { public Address Address { get; set; } } [ComplexTy
我是一名优秀的程序员,十分优秀!