<!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.7-b01-. --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.7-b01-. -->
<definitions targetNamespace="http://XXXXXX/" name="Service4business">
<types>
<xsd:schema>
<xsd:import namespace="http://XXXX" schemaLocation="http://XXXXX?xsd=1"/>
</xsd:schema>
</types>
<message name="queryUserInfo">
<part name="parameters" element="tns:queryUserInfo"/>
</message>
<message name="queryUserInfoResponse">
<part name="parameters" element="tns:queryUserInfoResponse"/>
</message>
<message name="queryGroupInfo">
<part name="parameters" element="tns:queryGroupInfo"/>
</message>
<message name="queryGroupInfoResponse">
<part name="parameters" element="tns:queryGroupInfoResponse"/>
</message>
<message name="authProduct">
<part name="parameters" element="tns:authProduct"/>
</message>
<message name="authProductResponse">
<part name="parameters" element="tns:authProductResponse"/>
</message>
<message name="authUser">
<part name="parameters" element="tns:authUser"/>
</message>
<message name="authUserResponse">
<part name="parameters" element="tns:authUserResponse"/>
</message>
<message name="registerIMS">
<part name="parameters" element="tns:registerIMS"/>
</message>
<message name="registerIMSResponse">
<part name="parameters" element="tns:registerIMSResponse"/>
</message>
<message name="authIMS">
<part name="parameters" element="tns:authIMS"/>
</message>
<message name="authIMSResponse">
<part name="parameters" element="tns:authIMSResponse"/>
</message>
<portType name="CoshipService4Business">
<operation name="queryUserInfo">
<input message="tns:queryUserInfo"/>
<output message="tns:queryUserInfoResponse"/>
</operation>
<operation name="queryGroupInfo">
<input message="tns:queryGroupInfo"/>
<output message="tns:queryGroupInfoResponse"/>
</operation>
<operation name="authProduct">
<input message="tns:authProduct"/>
<output message="tns:authProductResponse"/>
</operation>
<operation name="authUser">
<input message="tns:authUser"/>
<output message="tns:authUserResponse"/>
</operation>
<operation name="registerIMS">
<input message="tns:registerIMS"/>
<output message="tns:registerIMSResponse"/>
</operation>
<operation name="authIMS">
<input message="tns:authIMS"/>
<output message="tns:authIMSResponse"/>
</operation>
</portType>
<binding name="CoshipService4BusinessPortBinding" type="tns:CoshipService4Business">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="queryUserInfo">
<soap12:operation soapAction=""/>
<input>
<soap12:body use="literal"/>
</input>
<output>
<soap12:body use="literal"/>
</output>
</operation>
<operation name="queryGroupInfo">
<soap12:operation soapAction=""/>
<input>
<soap12:body use="literal"/>
</input>
<output>
<soap12:body use="literal"/>
</output>
</operation>
<operation name="authProduct">
<soap12:operation soapAction=""/>
<input>
<soap12:body use="literal"/>
</input>
<output>
<soap12:body use="literal"/>
</output>
</operation>
<operation name="authUser">
<soap12:operation soapAction=""/>
<input>
<soap12:body use="literal"/>
</input>
<output>
<soap12:body use="literal"/>
</output>
</operation><operation name="registerIMS">
<soap12:operation soapAction=""/>
<input>
<soap12:body use="literal"/>
</input>
<output>
<soap12:body use="literal"/>
</output>
</operation>
<operation name="authIMS">
<soap12:operation soapAction=""/>
<input>
<soap12:body use="literal"/>
</input>
<output>
<soap12:body use="literal"/>
</output>
</operation>
</binding>
<service name="Service4business">
<port name="CoshipService4BusinessPort" binding="tns:CoshipService4BusinessPortBinding">
<soap12:address location="http://xxxxxxx"/>
</port>
</service>
</definitions>我这里使用soap调用,为什么不得行呢?请分析下,在线等!ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache
try
{
$client = new SOAPClient('http://XXXXXXX/CoshipService?wsdl',array('trace' => 1));
}
catch(Exception $e)
{
echo $e->getMessage();}
$client->soap_defencoding = 'utf-8';
$client->decode_utf8 = false;
$client->xml_encoding = 'utf-8';
$product_code = '832411234';
$tv_id = '212321236';
$user_id = '123123';
$params = array(
'AMSP_Auth_Prod' => array(
'authType' => 1,
'productCode' => $product_code,
'resourceCode'=>'',
'spCode' => '123',
'tvCode' => $tv_id,
        'userCode' => $user_id,       
    )
);
$out = $client->authProduct($params);

解决方案 »

  1.   

    请给出正确的 WSDL
      

  2.   


    这是我刷出来的WSDL文件啊..
      

  3.   

    你把 XXXXXX 恢复出来!
      

  4.   


    这是我刷出来的WSDL文件啊..XXX 恢复出来也不得用,这wsdl是内网,公网不能访问的
      

  5.   

    这是我获取的方法及属性方法:array(6) {
      [0]=>
      string(62) "queryUserInfoResponse queryUserInfo(queryUserInfo $parameters)"
      [1]=>
      string(65) "queryGroupInfoResponse queryGroupInfo(queryGroupInfo $parameters)"
      [2]=>
      string(56) "authProductResponse authProduct(authProduct $parameters)"
      [3]=>
      string(47) "authUserResponse authUser(authUser $parameters)"
      [4]=>
      string(56) "registerIMSResponse registerIMS(registerIMS $parameters)"
      [5]=>
      string(44) "authIMSResponse authIMS(authIMS $parameters)"
    }
    属性:array(25) {
      [0]=>
      string(59) "struct queryGroupInfo {
     amspQueryGroup AMSP_Query_Group;
    }"
      [1]=>
      string(142) "struct amspQueryGroup {
     string queryParameter;
     string queryType;
     string setTopBoxId;
     string smartCardId;
     string TVCode;
     string userId;
    }"
      [2]=>
      string(61) "struct queryGroupInfoResponse {
     amspQueryGroupRESP return;
    }"
      [3]=>
      string(91) "struct amspQueryGroupRESP {
     string resultCode;
     string userGroup;
     string userGroupName;
    }"
      [4]=>
      string(49) "struct authUser {
     amspAuthUser AMSP_Auth_User;
    }"
      [5]=>
      string(92) "struct amspAuthUser {
     string spCode;
     string tvCode;
     string userCode;
     string userToken;
    }"
      [6]=>
      string(53) "struct authUserResponse {
     amspAuthUserRESP return;
    }"
      [7]=>
      string(102) "struct amspAuthUserRESP {
     string resultCode;
     string spCode;
     string spUserCode;
     string timestamp;
    }"
      [8]=>
      string(46) "struct queryUserInfo {
     queryInfo queryInfo;
    }"
      [9]=>
      string(97) "struct queryInfo {
     string queryType;
     string setTopBoxId;
     string smartCardId;
     string TVCode;
    }"
      [10]=>
      string(52) "struct queryUserInfoResponse {
     resultInfo return;
    }"
      [11]=>
      string(61) "struct resultInfo {
     string resultCode;
     userInfo userInfo;
    }"
      [12]=>
      string(248) "struct userInfo {
     string cityCode;
     string districtCode;
     string districtName;
     string phoneNumber;
     string setTopBoxId;
     string smartCardId;
     string status;
     string TVCode;
     string userCode;
     string userName;
     string userRank;
     string userType;
    }"
      [13]=>
      string(54) "struct authIMS {
     amspAuthIMSUser AMSP_Auth_IMSUser;
    }"
      [14]=>
      string(68) "struct amspAuthIMSUser {
     string setTopBoxId;
     string smartCardId;
    }"
      [15]=>
      string(55) "struct authIMSResponse {
     amspAuthIMSUserRESP return;
    }"
      [16]=>
      string(107) "struct amspAuthIMSUserRESP {
     string IMSNumber;
     string resultCode;
     string userId;
     string userPassword;
    }"
      [17]=>
      string(56) "struct registerIMS {
     amspRegIMSUser AMSP_Reg_IMSUser;
    }"
      [18]=>
      string(67) "struct amspRegIMSUser {
     string setTopBoxId;
     string smartCardId;
    }"
      [19]=>
      string(58) "struct registerIMSResponse {
     amspRegIMSUserRESP return;
    }"
      [20]=>
      string(65) "struct amspRegIMSUserRESP {
     string resultCode;
     string userId;
    }"
      [21]=>
      string(52) "struct authProduct {
     amspAuthProd AMSP_Auth_Prod;
    }"
      [22]=>
      string(131) "struct amspAuthProd {
     int authType;
     string productCode;
     string resourceCode;
     string spCode;
     string tvCode;
     string userCode;
    }"
      [23]=>
      string(56) "struct authProductResponse {
     amspAuthProdRESP return;
    }"
      [24]=>
      string(97) "struct amspAuthProdRESP {
     string authToken;
     string resultCode;
     int subId;
     string timestamp;
    }"
    }