php如何post xml到服务器

shirly871025 2010-10-26 10:43:12
请问各位高手们:
我通过php post xml到服务器报如下错误
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1:Client.NoSOAPAction</faultcode>
<faultstring>no SOAPAction header!</faultstring>
<detail>
<ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">imusic-gw1</ns2:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

是咋个回事啊?
...全文
176 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
shirly871025 2010-10-27
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 baiyuxiong 的回复:]
要学会提问。
把你发的XML内容发出来。
肯定是发的内容有错
[/Quote]
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:m0="http://music.msag.com/smsSend/req">
<msag:MessageHeader soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="1" xmlns:msag="http://www.msag.com">
<msag:spid>111111</msag:spid>
<msag:password>1324sdf45s</msag:password>
<msag:timestamp>2008.09.09 10:10:30</msag:timestamp>
</msag:MessageHeader>
<SOAP-ENV:Body>
<m:SMSSend xmlns:m="http://music.msag.com/smsSend/service">
<m:req>
<m0:spid>01028004</m0:spid>
<m0:phone>15308180093</m0:phone>
<m0:information>test</m0:information>
<m0:sourceType>0</m0:sourceType>
<m0:channelID>123456</m0:channelID>
</m:req>
</m:SMSSend>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
mrshelly 2010-10-27
  • 打赏
  • 举报
回复
使用抓包工具, 抓取正常的调用后. 用PHP模拟就行了.
codeyell-com 2010-10-27
  • 打赏
  • 举报
回复
要学会提问。
把你发的XML内容发出来。
肯定是发的内容有错

20,397

社区成员

发帖
与我相关
我的任务
社区描述
“超文本预处理器”,是在服务器端执行的脚本语言,尤其适用于Web开发并可嵌入HTML中。PHP语法利用了C、Java和Perl,该语言的主要目标是允许web开发人员快速编写动态网页。
phpphpstorm 技术论坛(原bbs)
社区管理员
  • 开源资源社区
  • phpstory
  • xuzuning
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧