(wsdl file) Resource not allowed

Discussion in 'ASP .Net Web Services' started by Ram Krishna Tripathi, May 16, 2006.

  1. Hello Friends,

    I have the wsdl file of the webservice.
    Now I am trying to access the api of webservice in asp program.
    Then it gives Error that >>>>>>> resource you are trying to access not
    allowed.
    other extension like .asmx , .asp are easily accessible.

    I think that

    Q1) ONE REASON may be for error

    xmlHTTP.Open ( "Post", "http://localhost/ASP.NET/enterprise.wsdl", false);

    that wsdl extension is not registered on IIS.
    So please tell me how to register the wsdl extension on IIS.

    Q2) or There is any utility to convert the .wsdl file to .asmx format.
    because other .asmx webservices are easily accessible.

    Code is given below.

    Thanks and Regards

    Ram Krishna Tripathi




    ===========

    Code in ASP is:--

    <html>
    <body>
    <script language="jscript">
    function btn_click (a, b)
    {
    var xmlObj = new ActiveXObject("Msxml2.DOMDocument") ;
    var sXml = "<?xml version=\"1.0\" ?>" ;
    sXml += "<soap:Envelope "
    sXml +=
    "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " ;
    sXml +=
    "xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" " ;
    sXml +=
    "xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" ;
    sXml += "<soap:Body>" ;
    sXml += "<login xmlns=\"http://salesforce.com/\">" ;
    sXml = sXml + "<username>" + a.value + "</username>"
    ;
    sXml = sXml + "<password>" + b.value + "</password>"
    ;
    sXml += "</login></soap:Body></soap:Envelope>"

    xmlObj.loadXML(sXml) ;

    XmlRequest.innerText = xmlObj.xml ;

    var xmlHTTP = new ActiveXObject("Msxml2.XMLHTTP") ;
    xmlHTTP.Open ( "Post",
    "http://localhost/ASP.NET/enterprise.wsdl", false);
    xmlHTTP.setRequestHeader("SOAPAction","http://salesforce.com/login")
    ;
    xmlHTTP.setRequestHeader("Content-Type", "text/xml;
    charset=utf-8" ) ;
    xmlHTTP.Send(xmlObj.xml) ;
    MyResult.innerText = xmlHTTP.responseText ;

    var xmlResponse = xmlHTTP.responseXML ;
    answer.innerText =
    xmlResponse.selectSingleNode("soap:Envelope/soap:Body/loginResponse/loginResult").text
    ;
    }

    </script>


    <form>
    <p>Please input a:<input id="a" name="a"></input></p>
    <p>Please input b:<input id="b" name="b"></input></p>
    <p>
    <input type="button" id="btn" value="Enter"
    onclick="jscript:btn_click(a, b)"></input>
    </p>
    <p>Answer is <span id="answer"></span></p>
    <hr></hr>
    <p>Request:</p>
    <span id="XmlRequest"></span>
    <p>Response:</p>
    <span id="MyResult"></span>

    </form>

    </body>
    </html>
     
    Ram Krishna Tripathi, May 16, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U3RldmVXZXN0bGluZw==?=

    HTTP 405 - Resource not allowed

    =?Utf-8?B?U3RldmVXZXN0bGluZw==?=, Nov 25, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    730
    =?Utf-8?B?U3RldmVXZXN0bGluZw==?=
    Nov 25, 2005
  2. RH
    Replies:
    1
    Views:
    265
    Dino Chiesa [Microsoft]
    May 27, 2004
  3. Roberto Kohler

    HTTP 405 - Resource not allowed

    Roberto Kohler, Jul 24, 2003, in forum: ASP General
    Replies:
    2
    Views:
    253
    Aaron Bertrand - MVP
    Jul 24, 2003
  4. Randin

    HTTP 405 - Resource not allowed

    Randin, Apr 18, 2009, in forum: ASP General
    Replies:
    1
    Views:
    175
    Bob Barrows
    Apr 18, 2009
  5. Iñaki Baz Castillo
    Replies:
    13
    Views:
    505
    Iñaki Baz Castillo
    May 1, 2011
Loading...

Share This Page