Home All Groups Group Topic Archive Search About

sp_OAGetProperty procedure is giving error

Author
13 Jan 2006 4:49 PM
vineet.jsl@gmail.com
i am encountering a problem when calling a web service from the stored
procedure.

the sp_OAGetProperty procedure is not running fine.

at this line the error generated is

0x80020006 ODSOLE Extended Procedure Unknown name.

do anyone have any idea about how to solve this problem. i need help.

here are my procedure and wsdl file


create PROCEDURE [dbo].[Airtel_ResetClientPassword]
AS

Declare @idSOAP int
Declare @hr int
Declare @chrXML varchar(8000)
Declare @hDoc Int

Declare @Ret1 VarChar(8000)
Declare @Ret2 VarChar(60)
Declare @Ret3 VarChar(60)
Declare @Ret4 VarChar(60)
Declare @Ret5 VarChar(60)
Declare @Ret6 VarChar(60)
Declare @Ret7 VarChar(60)

DECLARE @src varchar(255), @desc varchar(255)



EXEC @hr = sp_OACreate 'MSSOAP.SoapClient30', @idSOAP OUT

IF @hr = 0
BEGIN


EXEC @hr=sp_OAMethod @idSOAP,'MSSoapInit',Null,"C:\TEMP\Cap
Details\ResetClientPassword.wsdl","ResetClientPasswordService","ResetClientPassword"


IF @hr <> 0
BEGIN
EXEC sp_OAGetErrorInfo @idSOAP, @src OUT, @desc OUT
SELECT hr=convert(varbinary(4),@hr), Source=@src,
Description=@desc,'Init' as Method
RETURN
END

Declare @In1 as Varchar(3000)
Set @In1 =
'<error_Id>0</error_Id><error_Message></error_Message><newPassword>welcome2ibm</newPassword><status></status>'




--EXEC @hr = sp_OAMethod @idSOAP, 'getAndResetPassword', @hDoc
Out,@In1,'oxigen','welcome2ibm'
EXEC @hr = sp_OAMethod @idSOAP, 'getAndResetPassword', @hDoc
Out,@In1,'oxigen','welcome2ibm'

IF @hr <> 0
BEGIN
EXEC sp_OAGetErrorInfo @idSOAP, @src OUT, @desc OUT
SELECT hr=convert(varbinary(4),@hr), Source=@src,
Description=@desc,'Call' as Method
RETURN
END

Exec @hr = sp_OAGetProperty
@hDoc,'getAndResetPasswordResponse.getAndResetPasswordReturn.error_Id',
@chrXML Out




IF @hr <> 0
BEGIN
EXEC sp_OAGetErrorInfo @hDoc, @src OUT, @desc OUT

SELECT hr=convert(varbinary(4),@hr), Source=@src,
Description=@desc,'Get' as Method

RETURN
END



Select @hr,@hDoc,@chrXML
,@In1,@Ret1,@Ret2,@Ret3,@Ret4,@Ret5,@Ret6,@Ret7

EXEC @hr = sp_OADestroy @idSOAP
END
ELSE
BEGIN
EXEC sp_OAGetErrorInfo @idSOAP, @src OUT, @desc OUT
SELECT hr=convert(varbinary(4),@hr), Source=@src, Description=@desc
END



ResetClientPassword.wsdl file


<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://service.cap.ibm.com"
xmlns:impl="http://service.cap.ibm.com"
xmlns:intf="http://service.cap.ibm.com"
xmlns:tns2="http://data.cap.ibm.com"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
  <schema elementFormDefault="qualified"
targetNamespace="http://service.cap.ibm.com"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:impl="http://service.cap.ibm.com"
xmlns:intf="http://service.cap.ibm.com"
xmlns:tns2="http://data.cap.ibm.com"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <import namespace="http://data.cap.ibm.com"/>
   <element name="generateAndResetPassword">
    <complexType>
     <sequence>
      <element name="userId" nillable="true" type="xsd:string"/>
      <element name="password" nillable="true" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="generateAndResetPasswordResponse">
    <complexType>
     <sequence>
      <element name="generateAndResetPasswordReturn" nillable="true"
type="tns2:ResetData"/>
     </sequence>
    </complexType>
   </element>
  </schema>
  <schema elementFormDefault="qualified"
targetNamespace="http://data.cap.ibm.com"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:impl="http://service.cap.ibm.com"
xmlns:intf="http://service.cap.ibm.com"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <complexType name="ResetData">
    <sequence>
     <element name="error_Id" type="xsd:int"/>
     <element name="error_Message" nillable="true" type="xsd:string"/>
     <element name="newPassword" nillable="true" type="xsd:string"/>
     <element name="status" nillable="true" type="xsd:string"/>
    </sequence>
   </complexType>
  </schema>
</wsdl:types>

   <wsdl:message name="generateAndResetPasswordResponse">

      <wsdl:part element="intf:generateAndResetPasswordResponse"
name="parameters"/>

   </wsdl:message>

   <wsdl:message name="generateAndResetPasswordRequest">

      <wsdl:part element="intf:generateAndResetPassword"
name="parameters"/>

   </wsdl:message>

   <wsdl:portType name="ResetPassword">

      <wsdl:operation name="generateAndResetPassword">

         <wsdl:input message="intf:generateAndResetPasswordRequest"
name="generateAndResetPasswordRequest"/>

         <wsdl:output message="intf:generateAndResetPasswordResponse"
name="generateAndResetPasswordResponse"/>

      </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="ResetPasswordSoapBinding"
type="intf:ResetPassword">

      <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>

      <wsdl:operation name="generateAndResetPassword">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="generateAndResetPasswordRequest">

            <wsdlsoap:body use="literal"/>

         </wsdl:input>

         <wsdl:output name="generateAndResetPasswordResponse">

            <wsdlsoap:body use="literal"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="ResetPasswordService">

      <wsdl:port binding="intf:ResetPasswordSoapBinding"
name="ResetPassword">

         <wsdlsoap:address
location="http://202.56.229.72:9080/CapServer/services/ResetPassword"/>

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>


any help will really appreciated.

Regards,
Vineet

Author
14 Jan 2006 5:50 AM
vineet.jsl@gmail.com
Please help me soon...

AddThis Social Bookmark Button