SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Feb 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Consume WSDL in AJAX - displayed in classic ASP

    Hi all,

    I'm running out of options. MS SOAP 3 is not that robust to pass a COMPLEX TYPE. I would have to construct a COM just to achieve this. Can't use .NET since ASP.NET is not ENABLED - this frustrates me. It Would have been easy in c#.

    I've read some articles that we can CONSUME WSDL using AJAX though it looks complicated to me since i'm a newbie on how to send a REQUEST and get a RESPONSE.

    Here's my example:
    1. Initialize the WSDL location
    http://localhost/jeff/account.wsdl

    2. Need to call a function i.e. accountSearch(). Send Resquest.
    Issue: MS Soap 3.0 does not know if more than 1 parameter is involved. I would get an ERROR: One of parameter is Invalid.
    - <complexType name="ClientAccountSearchRequest">
    - <sequence>
    <element name="clientFlg" nillable="true" type="xsd:string" />
    <element name="acctFlg" nillable="true" type="xsd:string" />
    <element name="clientName" nillable="true" type="xsd:string" />
    <element maxOccurs="unbounded" name="accountNumber" nillable="true" type="xsd:string" />
    </sequence>
    </complexType>

    3. Get the Response back as XML Data obj.
    4. User XMLDOM parser


    SOAP code will look like this:
    oSOAP.mssoapinit("http://localhost/jeff/account.wsdl")
    'SOAP does not know this below
    strCurrency = oSOAP.clientAccountDataSearch("Y","FALSE","john","0001203","")
    Response.Write(strCurrency)

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is this something that has to be done directly by the client? I've done this kind of stuff but using server-side code (with the variables coming from form data entered by the client).

    I also had problems with mssoap and ended up writing my own handler that was based in ServerXMLHTTP, a technology similar to the XmlHttpRequest handler used by AJAX. Perhaps that is what you had in mind? (ASP forum would be better for this).

  3. #3
    SitePoint Addict
    Join Date
    Apr 2001
    Location
    Devon, UK
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Unless you're using .NET on both the client and the server, then SOAP could be tricky.

    SOAP messages aren't particularly efficient for AJAX calls either. Although it would be possible, you should keep the message size to an absolute minimum. Parsing it in JavaScript would also be another headache!

  4. #4
    SitePoint Member
    Join Date
    Feb 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Jim so you have the sample that I can look at. If you took care of this in server side, did you write it in COM then use the ServerXMLHTTP?

    It would be such great help.

    Thanks a lot

  5. #5
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have that code on a cd somewhere let me dig it up, check back tomorrow.

  6. #6
    SitePoint Member
    Join Date
    Feb 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll wait. thank you so much!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •