請教一個soap的問題。線上等。謝謝

來源:互聯網
上載者:User
   -  -  - - -        -      -      -      -      -      -      -      -      -      -      -      -      - -         -         -         -         -         -           -    -    -      -        -    -      -        -    -      -        -    -      -        -    -      -        -    -      -          - -          







用的是 nusoap
我只要 'authProduct' 去調用一下就可以
$sendurl='http://10.10.10.10:18080/aaa/Business/Service?wsdl';$client = new soapclient($sendurl, true);//查看一下是不是報錯  $err = $client->getError();  if ($err) {   //顯示錯誤  編碼 echo '

Constructor error

' . $err . '
'; } $client->soap_defencoding = 'utf-8';$client->decode_utf8 = false;$client->xml_encoding = 'utf-8';$param = array('AMSP_Auth_Prod'=>array('userCode'=>'1212','tvCode'=>'2848','productCode'=>'80060','spCode'=>'SP1N','resourceCode'=>'','authType'=>0));dump($param);$result = $client->call('authProduct', $param);dump($client->request);if (!$err=$client->getError()) { echo " ddd :",htmlentities($str,ENT_QUOTES); } else { echo " er :",htmlentities($err,ENT_QUOTES); }



產生的xml
080060SP1N28481212

在soapui裡面可以的。但是程式報錯

er :HTTP Error: Unsupported HTTP response status 415 Unsupported Media Type (soapclient->response has contents of the response)





回複討論(解決方案)

線上等。自己up一下

標頭檔

string(860) "POST /aaa/Business/Service HTTP/1.0
Host: 172.31.178.4:18080
User-Agent: NuSOAP/0.9.5 (1.123)
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 679

自己搞定了。我靠。痛苦死我了

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.