asp怎么访问java的短信接口_ASP教程-查字典教程网
asp怎么访问java的短信接口
asp怎么访问java的短信接口
发布时间:2015-06-05 来源:查字典编辑
摘要:asp如何访问java的短信接口对方程序是java做的,提供了一个地址,还有用户名,密码说往这里传参数就可以发短信,我用ie直接访问此地址,...

asp 如何访问java的短信接口

对方程序是java做的,提供了一个地址,还有用户名,密码 说往这里传参数就可以发短信,
我用ie直接访问此地址,看到的是一个xml文件
asp这边需要如何传递短信的一些参数还有用户名密码给对方呢
希望别贴教程,点拨一下最好,因为我从网上找了一些范例,但总是只返回状态200 ok 没有任何返回值,也没有发送成短信,所以不知道为什么了
用户名密码是用来识别是谁要调用此接口发短信
对方提供的url地址 10.13.255.196/SmsDownlinkReceive/services/DownlinkServiceImpl?wsdl
下面是用ie访问这个地址后的xml文件
<?xml version="1.0" encoding="UTF-8" ?>
<wsdl:definitions targetNamespace="" xmlns:apachesoap="

/xml-soap" xmlns:impl="" xmlns:intf="service.downlink.sms

" xmlns:tns1="http:

//" xmlns:wsdl

="/wsdl/" xmlns:wsdlsoap="/wsdl/soap/" xml

ns:xsd="/2001/XMLSchema">
<!--
WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)

-->
- <wsdl:types>
<schema elementFormDef

ault="qualified" targetNamespace="" xmlns="http

:///2001/XMLSchema">
<import namespace="" />
<element name="getSmsStateById">
<complexType>
<sequence>
<element name="smsId" type="xsd:string" />
</sequence>
</complexType>
</element>
<element name="getSmsStateByIdResponse">
<complexType>
<sequence>
<element name="getSmsStateByIdReturn" type="xsd:string" />
</sequence>
</complexType>
</element>
<element name="fault" type="tns1:SmsException" />
<element name="sendSms">
<complexType>
<sequence>
<element name="userName" type="xsd:string" />
<element name="password" type="xsd:string" />
<element name="importance" type="xsd:int" />
<element name="mobile" type="xsd:string" />
<element name="smsBody" type="xsd:string" />
<element name="allowStartTime" type="xsd:int" />
<element name="allowEndTime" type="xsd:int" />
<element name="deadLineTime" type="xsd:dateTime" />
<element name="appointTime" type="xsd:dateTime" />
<element name="smsType" type="xsd:string" />
<element name="feeDept" type="xsd:string" />
</sequence>
</complexType>
</element>
<element name="sendSmsResponse">
<complexType>
<sequence>
<element name="sendSmsReturn" type="xsd:string" />
</sequence>
</complexType>
</element>
</schema>
<schema elementFormDefault="qualified" targetNamesp

ace="" xmlns="h

ttp:///2001/XMLSchema">
<complexType name="SmsException">
<sequence>
<element name="errorMessage" nillable="true" type="xsd:string" />
<element name="errorCode" nillable="true" type="xsd:string" />
</sequence>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="sendSmsResponse">
<wsdl:part element="intf:sendSmsResponse" name="parameters" />
</wsdl:message>
<wsdl:message name="getSmsStateByIdResponse">
<wsdl:part element="intf:getSmsStateByIdResponse" name="parameters" />
</wsdl:message>
<wsdl:message name="SmsException">
<wsdl:part element="intf:fault" name="fault" />
</wsdl:message>
<wsdl:message name="sendSmsRequest">
<wsdl:part element="intf:sendSms" name="parameters" />
</wsdl:message>
<wsdl:message name="getSmsStateByIdRequest">
<wsdl:part element="intf:getSmsStateById" name="parameters" />
</wsdl:message>
<wsdl:portType name="DownlinkServiceImpl">
<wsdl:operation name="getSmsStateById">
<wsdl:input message="intf:getSmsStateByIdRequest" name="getSmsStateByIdRequest" />
<wsdl:output message="intf:getSmsStateByIdResponse" name="getSmsStateByIdResponse" />
<wsdl:fault message="intf:SmsException" name="SmsException" />
</wsdl:operation>
<wsdl:operation name="sendSms">
<wsdl:input message="intf:sendSmsRequest" name="sendSmsRequest" />
<wsdl:output message="intf:sendSmsResponse" name="sendSmsResponse" />

<wsdl:fault message="intf:SmsException" name="SmsException" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="DownlinkServiceImplSoapBinding" type="intf:DownlinkServiceImpl">
<wsdlsoap:binding style="document" transport="/soap/http" />
<wsdl:operation name="getSmsStateById">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="getSmsStateByIdRequest">
<wsdlsoap:body use="literal" />
</wsdl:input>
<wsdl:output name="getSmsStateByIdResponse">
<wsdlsoap:body use="literal" />
</wsdl:output>
<wsdl:fault name="SmsException">
<wsdlsoap:fault name="SmsException" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="sendSms">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="sendSmsRequest">
<wsdlsoap:body use="literal" />
</wsdl:input>
<wsdl:output name="sendSmsResponse">
<wsdlsoap:body use="literal" />
</wsdl:output>
<wsdl:fault name="SmsException">
<wsdlsoap:fault name="SmsException" use="literal" />
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="DownlinkServiceImplService">
<wsdl:port binding="intf:DownlinkServiceImplSoapBinding" name="DownlinkServiceImpl">
<wsdlsoap:address location="10.13.255.196/SmsDownli

nkReceive/services/DownlinkServiceImpl" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

------解决方案--------------------
1 装一个 XMLSpy软件,访问所给的url地址,建一个ws soap请求(得到正确的请求格式), 看下正确的返回值格式
2 装一个pocketsoap组件, 按上述请求格式构造请求, 按上述返回格式解析返回值

相关阅读
推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
  • 大家都在看
  • 小编推荐
  • 猜你喜欢
  • 最新ASP教程学习
    热门ASP教程学习
    编程开发子分类