Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6618049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:46:44+00:00 2026-05-25T20:46:44+00:00

I am currently trying to consume an API that is working fine in my

  • 0

I am currently trying to consume an API that is working fine in my browser – my code is as follows:

function getHistory() {

  var wsdl = SoapService.wsdl("http://zulutrade.com/WebServices/Performance.asmx?WSDL");

  var performanceService = wsdl.getService("PerformanceWebService");

  var param = Xml.element("GetProviderTrades", [
                Xml.attribute("xmlns", "ZuluTrade.WebServices"),
                Xml.element("length",["100"]),
                Xml.element("sortBy",["dc"]),
                Xml.element("sortAscending",[false]),
                Xml.element("providerId",["24508"]),
                Xml.element("currencyIds",["[]"]),
                Xml.element("fromDateStr",["1984-04-24"]),
                Xml.element("toDateStr",["2011-09-10"]),
                Xml.element("validTrades",[true]),
                Xml.element("lotSize",["2"])
              ]);

  //var envelope = performanceService.getSoapEnvelope("GetProviderTrades", param)
  //Logger.log(envelope);

  var result = performanceService.GetProviderTrades(param);

  Logger.log(result);
}

This appears to be connecting to the service, but is generating the error:

Request failed for http://zulutrade.com/WebServices/Performance.asmx returned code 500. Server response: soap:ClientServer was unable to read request. —> There is an error in XML document (1, 640). —> Instance validation error: ‘2’ is not a valid value for LotSize. (line 26)

In order to set each of the parameters, I have copied exactly the payload from the developer tools of Chrome when accessing the page (go to http://www.zulutrade.com/TradeHistoryIndividual.aspx?pid=24508 and change the number of visible trades while viewing the XHR requests to see the payload). As I have set the lotSize to 2, as per the payload in the browser request, I would have expected this to work, but it clearly does not.

Looking at the schema at http://zulutrade.com/WebServices/Performance.asmx?WSDL, I can see the following for lotSize:

<s:element minOccurs="1" maxOccurs="1" name="lotSize" type="tns:LotSize"/>

This looks like it has type tns:LotSize – is this why I am getting the error? If so, how can I pass something of this type in my request?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T20:46:44+00:00Added an answer on May 25, 2026 at 8:46 pm

    afaik from WSDL you can see that

    <s:simpleType name="LotSize">
        <s:restriction base="s:string">
            <s:enumeration value="Micro"/>
            <s:enumeration value="Mini"/>
            <s:enumeration value="Standard"/>
        </s:restriction>
    </s:simpleType>
    

    So lotSize can be

    Xml.element("lotSize","Mini") // 2nd value, instead of ["2"]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently trying to write some code that will accept some FTP details,
I'm currently trying to consume a FORTRAN DLL that I have been given by
Currently trying at add ajax to a site, after much reading I discovered that
I'm currently trying to consume a list of strings from some XML using Apache
I'm trying to refactor a component that currently produces a Seq[X] using a fairly
Im currently trying to downlaod a audio track from a WCF, i need some
Im currently trying to learn some stuff about encryption, it's algorithms and how it
I'm currently trying out Aptana Studio 3 for PHP development (I'm pretty new to
I am currently trying to categorise a users music collection and the ability to
I'm currently trying to set up a secured folder with a few pages within

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.