472,126 Members | 1,539 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,126 software developers and data experts.

SOAP (access multiple <element name> wsdl) in Classic ASP

Hi All,

I'm using SOAP3.0. I was able to successfully call a WSDL file and get
a value properly. But when the WSDL changed to have a MULTIPLE
<element name> it was failing.

This code works BEFORE: strCurrency =
oSOAP.eServeSearch(CSTR(Request.Form("T1")))
until the WSDL file changed to have more <element name>
T1 is just a field that accepts a STRING

***** ASP ERROR due to the changes in WSDL:

Error Type:
Microsoft VBScript runtime (0x800A01C2)
Wrong number of arguments or invalid property assignment: 'strCurrency'
/soap_disp.asp, line 53


Please help me. I'm not sure if I have to use a SOAP Serializer????

Thanks in advance.....

Jeff
jparulan@gmail.com



*********** ASP CODE *************
<%

Dim strCurrency, strDialCode, strGMT

Call SoapRequest()
%>

<HTML>
<BODY>

<P>
<font face="verdana" size="-2"><b>Currency: </b> <%=strCurrency%>
</font>

</BODY>
</HTML>

<%
Function SoapRequest

If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
'initialize the variables

Dim oSOAP
' Instantiate the SOAP object
Set oSOAP = Server.CreateObject("MSSOAP.SoapClient30")
oSOAP.ClientProperty("ServerHTTPRequest") = True

'**** Call the eServeInquiry.wsdl
oSOAP.mssoapinit("eeInquiry.wsdl")

oSOAP.eServeSearch(CSTR(Request.Form("T1")))

'*** if the above line is called like this, IT FAILS *******
'*** since the response returns multiple <element name> at THIS TIME
'strCurrency = oSOAP.eServeSearch(CSTR(Request.Form("T1")))

'Response.write("Test: " &
oSOAP.eServeSearch(CSTR(Request.Form("T1"))) )

set oSOAP = Nothing

End If
End Function
%>


************** WSDL FILE **************************************

<?xml version="1.0" ?>
- <definitions
targetNamespace="urn:PegaRULES:SOAP:eServeSoapPack age:eServeInquiry"
xmlns:tns="urn:PegaRULES:SOAP:eServeSoapPackage:eS erveInquiry"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="urn:JPM-Work:eServeInfo"
xmlns="http://schemas.xmlsoap.org/wsdl/">
- <types>
- <schema targetNamespace="urn:JPM-Work:eServeInfo"
elementFormDefault="unqualified"
xmlns="http://www.w3.org/2001/XMLSchema">
- <complexType name="pagedata">
- <sequence>
<element name="Amount" minOccurs="0" type="xsd:decimal" />
<element name="CDTID" minOccurs="0" type="xsd:string" />
<element name="CHIPSSendSequence" minOccurs="0" type="xsd:string" />
<element name="CompStatus" minOccurs="0" type="xsd:string" />
<element name="CustomerName" minOccurs="0" type="xsd:string" />
<element name="DBTID" minOccurs="0" type="xsd:string" />
<element name="ErrorParty" minOccurs="0" type="xsd:string" />
<element name="ErrorType" minOccurs="0" type="xsd:string" />
<element name="FEDOMAD" minOccurs="0" type="xsd:string" />
<element name="GFP_ID" minOccurs="0" type="xsd:long" />
<element name="InstructionType" minOccurs="0" type="xsd:string" />
<element name="OrigParty" minOccurs="0" type="xsd:string" />
<element name="SIStatusWork" minOccurs="0" type="xsd:string" />
<element name="TransactionDate" minOccurs="0" type="xsd:date" />
<element name="TransactionType" minOccurs="0" type="xsd:string" />
</sequence>
</complexType>
</schema>
- <schema
targetNamespace="urn:PegaRULES:SOAP:eServeSoapPack age:eServeInquiry"
elementFormDefault="unqualified"
xmlns="http://www.w3.org/2001/XMLSchema">
- <element name="eServeSearch">
- <complexType>
- <sequence>
<element name="CaseID" type="xsd:string" />
</sequence>
</complexType>
</element>
- <element name="eServeSearchResponse">
- <complexType>
- <sequence>
<element name="eServePage" type="ns1:pagedata" />
</sequence>
</complexType>
</element>
</schema>
</types>
- <message name="eServeSearch">
<part name="parameters" element="tns:eServeSearch" />
</message>
- <message name="eServeSearchResponse">
<part name="parameters" element="tns:eServeSearchResponse" />
</message>
- <portType name="eServeInquiryType">
- <operation name="eServeSearch">
<input message="tns:eServeSearch" />
<output message="tns:eServeSearchResponse" />
</operation>
</portType>
- <binding name="eServeInquiryBinding" type="tns:eServeInquiryType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <operation name="eServeSearch">
<soap:operation style="document"
soapAction="urn:PegaRULES:SOAP:eServeSoapPackage:e ServeInquiry#eServeSearch"
/>
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
</binding>
- <service name="eServeInquiryService">
- <port name="eServeInquiryPort" binding="tns:eServeInquiryBinding">
<soap:address
location="http://.ny..com:8889/prweb/PRSOAPServlet" />

</port>
</service>
</definitions>
Aug 30 '06 #1
3 11473
sashi
1,754 Expert 1GB
Hi there,

Microsoft VBScript runtime (0x800A01C2)
Wrong number of arguments or invalid property assignment means insufficient number of input supplied. Lets assume, the function XYZ accepts 3 input, you need to pass 3 inputs along with instead of 2 inputs. Please refer to below sample.. take care my fren.. :)

Expand|Select|Wrap|Line Numbers
  1. Function XYZ(strName, strAddress, nPhoneNo)
  2.     ... perform some action here...
  3.  End Function  
  4.  
Expand|Select|Wrap|Line Numbers
  1. 'Proper usage will be
  2. Dim strDetails
  3.     strDetails = XYZ("Name", "Address", "601667724")
  4.  
  5. 'Improper usage will be
  6.    strDetails = XYZ("Name", "601667724")
  7.  
Aug 30 '06 #2
The error is kind of misleading. I don't think the problem was "wrong # of args" but it's the "invalid prop assignment". When my team changed the WSDL to have more <element name>, the single assignment stopped working:

strCurrency = oSOAP.eServeSearch(CSTR(Request.Form("T1")))

When I un-assigned the function call, it worked, but how do I access the <element name>????
oSOAP.eServeSearch(CSTR(Request.Form("T1")))

Thanks,
Jeff

************************************************** **********************
Hi there,

Microsoft VBScript runtime (0x800A01C2)
Wrong number of arguments or invalid property assignment means insufficient number of input supplied. Lets assume, the function XYZ accepts 3 input, you need to pass 3 inputs along with instead of 2 inputs. Please refer to below sample.. take care my fren.. :)

Expand|Select|Wrap|Line Numbers
  1. Function XYZ(strName, strAddress, nPhoneNo)
  2.     ... perform some action here...
  3.  End Function  
  4.  
Expand|Select|Wrap|Line Numbers
  1. 'Proper usage will be
  2. Dim strDetails
  3.     strDetails = XYZ("Name", "Address", "601667724")
  4.  
  5. 'Improper usage will be
  6.    strDetails = XYZ("Name", "601667724")
  7.  
Aug 30 '06 #3
Hello,

You will try with below link

http://www.codeproject.com/KB/vbscript/SOAP___Classic_ASP.aspx

by,
a2z info
http://www.a2zinterviewquestions.com



The error is kind of misleading. I don't think the problem was "wrong # of args" but it's the "invalid prop assignment". When my team changed the WSDL to have more <element name>, the single assignment stopped working:

strCurrency = oSOAP.eServeSearch(CSTR(Request.Form("T1")))

When I un-assigned the function call, it worked, but how do I access the <element name>????
oSOAP.eServeSearch(CSTR(Request.Form("T1")))

Thanks,
Jeff

************************************************** **********************
Mar 17 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Christopher | last post: by
4 posts views Thread by Don Wash | last post: by
1 post views Thread by mahesh.kanakaraj | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.