哪位做过ISAPI DLL型Webservice程序的高手,请帮忙看看我得程序出了什么问题?(100分)

  • 主题发起人 主题发起人 tresa
  • 开始时间 开始时间
T

tresa

Unregistered / Unconfirmed
GUEST, unregistred user!
我现在做一个项目,要用到SOAP、Webservice、Corba,因为要求效率,我就做了个ISAPI DLL 型的Webservice程序(这个动态链接库里用到了Corba),已经编译成功生成了DLL,而且发布到了IIS下的虚拟目录下,在访问本机(http://localhost/corbawebservice/PCorbaWebservice.dll/wsdl/IIChenjieYJ)时可以看到生成接口的XML文件,但是在访问http://localhost/corbawebservice/PCorbaWebservice.dll/soap/IIChenjieYJ时,就显示出错,提示“XML文件必须要有一个顶层元素”,不知是什么问题?
而且我又用WSDL Importer做了一个客户端后,只要是访问这个接口的时候,就提示错误为“Access Violation in PCorbaWebservice.dll,Read Address 00000000”等等之类。研究了好几天,始终不得其解,请各位高手指教!
 
关注中-----------
 
我也在学SOAP,请问有没有遇到这个问题:
http://www.delphibbs.com/delphibbs/dispq.asp?lid=2235534
 
修改dll的project文件中顺序, 正确应该是
ISAPIApp,
ISAPIThreadPool

 
Dll中的ISAPI两个文件的顺序没有错亚
 
可以先用web app debug的形式调试程序再生成dll,这样调试就很方便了
 
还有哪些方法能帮我解决问题呀,我这里都焦头烂额了
 
可能是你xml文件写错了
你将生成的xml用xmldocument看能不能打开即可。
要不你将xml贴出来看看
 
我得XML文件如下:
<?xml version="1.0" ?>
- <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="IIChenjieYJservice" targetNamespace="http://tempuri.org/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://www.borland.com/namespaces/Types">
- <types>
- <xs:schema targetNamespace="http://www.borland.com/namespaces/Types" xmlns="http://www.borland.com/namespaces/Types">
- <xs:complexType name="TDoubleDynArray">
- <xs:complexContent>
- <xs:restriction base="soapenc:Array">
<xs:sequence />
<xs:attribute ref="soapenc:arrayType" n1:arrayType="xs:double[]" xmlns:n1="http://schemas.xmlsoap.org/wsdl/" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:schema>
</types>
- <message name="SendSamplesignalRequest">
<part name="MySampleIndex" type="xs:short" />
</message>
- <message name="SendSamplesignalResponse">
<part name="return" type="ns1:TDoubleDynArray" />
</message>
- <message name="SendFeaturesignalRequest">
<part name="MyFeatureIndex" type="xs:short" />
</message>
- <message name="SendFeaturesignalResponse">
<part name="return" type="ns1:TDoubleDynArray" />
</message>
<message name="SendSamplePointRequest" />
- <message name="SendSamplePointResponse">
<part name="return" type="xs:int" />
</message>
<message name="SendFrequenceRequest" />
- <message name="SendFrequenceResponse">
<part name="return" type="xs:int" />
</message>
- <portType name="IIChenjieYJ">
- <operation name="SendSamplesignal">
<input message="tns:SendSamplesignalRequest" />
<output message="tns:SendSamplesignalResponse" />
</operation>
- <operation name="SendFeaturesignal">
<input message="tns:SendFeaturesignalRequest" />
<output message="tns:SendFeaturesignalResponse" />
</operation>
- <operation name="SendSamplePoint">
<input message="tns:SendSamplePointRequest" />
<output message="tns:SendSamplePointResponse" />
</operation>
- <operation name="SendFrequence">
<input message="tns:SendFrequenceRequest" />
<output message="tns:SendFrequenceResponse" />
</operation>
</portType>
- <binding name="IIChenjieYJbinding" type="tns:IIChenjieYJ">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
- <operation name="SendSamplesignal">
<soap:operation soapAction="urn:IChenjieYJIntf-IIChenjieYJ#SendSamplesignal" style="rpc" />
- <input>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:IChenjieYJIntf-IIChenjieYJ" />
</input>
- <output>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:IChenjieYJIntf-IIChenjieYJ" />
</output>
</operation>
- <operation name="SendFeaturesignal">
<soap:operation soapAction="urn:IChenjieYJIntf-IIChenjieYJ#SendFeaturesignal" style="rpc" />
- <input>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:IChenjieYJIntf-IIChenjieYJ" />
</input>
- <output>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:IChenjieYJIntf-IIChenjieYJ" />
</output>
</operation>
- <operation name="SendSamplePoint">
<soap:operation soapAction="urn:IChenjieYJIntf-IIChenjieYJ#SendSamplePoint" style="rpc" />
- <input>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:IChenjieYJIntf-IIChenjieYJ" />
</input>
- <output>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:IChenjieYJIntf-IIChenjieYJ" />
</output>
</operation>
- <operation name="SendFrequence">
<soap:operation soapAction="urn:IChenjieYJIntf-IIChenjieYJ#SendFrequence" style="rpc" />
- <input>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:IChenjieYJIntf-IIChenjieYJ" />
</input>
- <output>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:IChenjieYJIntf-IIChenjieYJ" />
</output>
</operation>
</binding>
- <service name="IIChenjieYJservice">
- <port name="IIChenjieYJPort" binding="tns:IIChenjieYJbinding">
<soap:address location="http://192.168.13.47/corbaweb/PCorbaWebService.dll/soap/IIChenjieYJ" />
</port>
</service>
</definitions>
 
hstod兄,XMLDocument又是什么呀?怎么用呢?
 
各位大虾,我最近怀疑可能是有一个地方出了问题,因为我的Intf文件和Impl文件里引用了我的WebModule文件(在此文件里我初始化了一些变量),这样做会不会有什么问题呀?我师兄用C++Builder这样做是没有问题的。大虾们,有没有碰到过这样的问题呀?
 
在IMPL中好象不能引用WEBMODULE中的变量,我以前也出现过这种问题。将变量初始不要放在WEBMODULE中即可。
 
后退
顶部