Error 500 on oXmlHTTP.Send

R

RG

I have an aspx web pages which interacts with an asmx service. The calls to
web service are done via Javascript.

The asmx service method has the following parameters:

public string RetrieveContact(string Id, int EntityTypeCode)


I am getting the following error when executing
oXmlHTTP.Send("id=" + sId + "&ObjectTypeCode=" + sObjectTypeCode);

which resolves into

oXmlHTTP.Send("id=7AA4FB86-24D6-DA11-B240-000F20F62526&ObjectTypeCode=1");



responseText "System.InvalidOperationException: Missing parameter:
EntityTypeCode.
at
System.Web.Services.Protocols.ValueCollectionParameterReader.Read(NameValueCollection
collection)
at System.Web.Services.Protocols.HtmlFormParameterReader.Read(HttpRequest
request)
at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters()
at System.Web.Services.Protocols.WebServiceHandler.Invoke()
at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()
" String

Would anyone know how to resolve this.

Thanks in advance
 
G

Guest

Why are you using legacy COM MSXMLXX objects to do this when you can simply
create a webReference for your ASPX page to use and make a typical .NET
WebService proxy call?
Peter
 
R

RG

Thanks for your help. I am customizing Microsoft CRM 3.0. So, the aspx
code is off limits. However, I could customize an onChange event for a
field. There, is where I am trying to access service I had written.
 
R

RG

I figured out the problem. The parameter name on the service didn't match
that on xmlhttp.send. Specifically, the second parameter.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top