Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > (wsdl file) Resource not allowed

Reply
Thread Tools

(wsdl file) Resource not allowed

 
 
Ram Krishna Tripathi
Guest
Posts: n/a
 
      05-16-2006
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 +=
"xmlnssi=\"http://www.w3.org/2001/XMLSchema-instance\" " ;
sXml +=
"xmlnssd=\"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>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why defining a constant in a method is not allowed but usingself.class.const_set is allowed? IƱaki Baz Castillo Ruby 13 05-01-2011 06:09 PM
HTTP 405 - Resource not allowed Randin ASP General 1 04-18-2009 05:35 PM
Very annoying error: Access to the path is denied. ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity Jay ASP .Net 2 08-20-2007 07:38 PM
HTTP 405 - Resource not allowed =?Utf-8?B?U3RldmVXZXN0bGluZw==?= ASP .Net 0 11-25-2005 08:19 PM
HTTP 405 - Resource not allowed Roberto Kohler ASP General 2 07-24-2003 05:01 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57