首页 > 后端开发 > php教程 > php调用java webservice 在线等,请各位大侠帮帮忙,

php调用java webservice 在线等,请各位大侠帮帮忙,

WBOY
发布: 2016-06-23 14:04:31
原创
995 人浏览过

<?xml version="1.0" encoding="UTF-8" standalone="no"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:sch="http://trace.bnet.cn/terminal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://trace.bnet.cn/terminal" targetNamespace="http://trace.bnet.cn/terminal">  <wsdl:types>    <schema xmlns="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://trace.bnet.cn/terminal"><element name="getTerminalListRequest"><complexType><sequence><element name="key" type="string"/><element name="page" type="string"/></sequence></complexType></element><element name="getTerminalListResponse" type="string"/><element name="setTerminalsActivationRequest"><complexType><sequence><element name="timeStamp" type="string"/><element name="key" type="string"/><element name="terminals" type="string"/><element name="value" type="string"/><element name="type" nillable="true" type="string"/><element name="effectiveLocTime" nillable="true" type="string"/><element name="smsContent" nillable="true" type="string"/></sequence></complexType></element><element name="setTerminalsActivationResponse" type="string"/><element name="setTerminalNameRequest"><complexType><sequence><element name="key" type="string"/><element name="mdn" type="string"/><element name="name" type="string"/></sequence></complexType></element><element name="setTerminalNameResponse" type="string"/></schema>  </wsdl:types>  <wsdl:message name="setTerminalNameRequest">    <wsdl:part element="tns:setTerminalNameRequest" name="setTerminalNameRequest">    </wsdl:part>  </wsdl:message>  <wsdl:message name="setTerminalsActivationRequest">    <wsdl:part element="tns:setTerminalsActivationRequest" name="setTerminalsActivationRequest">    </wsdl:part>  </wsdl:message>  <wsdl:message name="setTerminalsActivationResponse">    <wsdl:part element="tns:setTerminalsActivationResponse" name="setTerminalsActivationResponse">    </wsdl:part>  </wsdl:message>  <wsdl:message name="getTerminalListRequest">    <wsdl:part element="tns:getTerminalListRequest" name="getTerminalListRequest">    </wsdl:part>  </wsdl:message>  <wsdl:message name="getTerminalListResponse">    <wsdl:part element="tns:getTerminalListResponse" name="getTerminalListResponse">    </wsdl:part>  </wsdl:message>  <wsdl:message name="setTerminalNameResponse">    <wsdl:part element="tns:setTerminalNameResponse" name="setTerminalNameResponse">    </wsdl:part>  </wsdl:message>  <wsdl:portType name="Terminal">    <wsdl:operation name="setTerminalName">      <wsdl:input message="tns:setTerminalNameRequest" name="setTerminalNameRequest">    </wsdl:input>      <wsdl:output message="tns:setTerminalNameResponse" name="setTerminalNameResponse">    </wsdl:output>    </wsdl:operation>    <wsdl:operation name="setTerminalsActivation">      <wsdl:input message="tns:setTerminalsActivationRequest" name="setTerminalsActivationRequest">    </wsdl:input>      <wsdl:output message="tns:setTerminalsActivationResponse" name="setTerminalsActivationResponse">    </wsdl:output>    </wsdl:operation>    <wsdl:operation name="getTerminalList">      <wsdl:input message="tns:getTerminalListRequest" name="getTerminalListRequest">    </wsdl:input>      <wsdl:output message="tns:getTerminalListResponse" name="getTerminalListResponse">    </wsdl:output>    </wsdl:operation>  </wsdl:portType>  <wsdl:binding name="TerminalSoap11" type="tns:Terminal">    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>    <wsdl:operation name="setTerminalName">      <soap:operation soapAction=""/>      <wsdl:input name="setTerminalNameRequest">        <soap:body use="literal"/>      </wsdl:input>      <wsdl:output name="setTerminalNameResponse">        <soap:body use="literal"/>      </wsdl:output>    </wsdl:operation>    <wsdl:operation name="setTerminalsActivation">      <soap:operation soapAction=""/>      <wsdl:input name="setTerminalsActivationRequest">        <soap:body use="literal"/>      </wsdl:input>      <wsdl:output name="setTerminalsActivationResponse">        <soap:body use="literal"/>      </wsdl:output>    </wsdl:operation>    <wsdl:operation name="getTerminalList">      <soap:operation soapAction=""/>      <wsdl:input name="getTerminalListRequest">        <soap:body use="literal"/>      </wsdl:input>      <wsdl:output name="getTerminalListResponse">        <soap:body use="literal"/>      </wsdl:output>    </wsdl:operation>  </wsdl:binding>  <wsdl:service name="TerminalService">    <wsdl:port binding="tns:TerminalSoap11" name="TerminalSoap11">      <soap:address location="http://219.142.70.14:60008/ids/terminal/terminalWs"/>    </wsdl:port>  </wsdl:service></wsdl:definitions>
登录后复制


==================================================
$result = $c->setTerminalsActivation(date('yyyy-MM-dd hh:ii:ss',time()),'fdb6680c8cad4b21b8d7e5b6e4bc6b87','13330968452','1');
登录后复制

我是这样子调用的,接口始终给我返回了一个 90001 key 不存在
接口是这样定义的
String setTerminalsActivation(String timeStamp, String key, String
terminals, String value)
==================================


回复讨论(解决方案)

有列出所有key的方法吗?

大小写有关吗?

string setTerminalsActivation(setTerminalsActivationRequest $setTerminalsActivationRequest)

方法 setTerminalsActivation 需要传递一个 setTerminalsActivationRequest 结构

setTerminalsActivationRequest 结构为
struct setTerminalsActivationRequest {
 string timeStamp;
 string key;
 string terminals;
 string value;
 string type;
 string effectiveLocTime;
 string smsContent;
}

php 调用时应为
$c->setTerminalsActivation(array(
 'timeStamp' => '',
 'key' => '',
 'terminals' => '',
 'value' => '',
 'type' => '',
 'effectiveLocTime' => '',
 'smsContent' => '',
));
数组元素的值你自己填

2楼的哥们,谢谢了,大意了.问题解决了.

来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板