Ask a Question related to ASP.NET Web Services, Design and Development.
-
JD #1
HttpPOST fails when using XmlNode
Can someone explain why HTTP Post fails when implementing this simple
webmethod?
[WebMethod]
public XmlNode Echo(XmlNode doc) {
return doc;
}
while the following works fine:
[WebMethod]
public XmlNode EchoDoc(string doc)
{
XmlDocument xmldoc = new XmlDocument();
xmldoc.LoadXml(doc);
return (XmlNode) xmldoc;
}
Configuration:
ASP.NET 1.1 and
<add name="HttpPost"/> has been added to the web.config
Here's the error I receive:
System.InvalidOperationException: Echo Web Service method name is not valid.
at System.Web.Services.Protocols.HttpServerProtocol.I nitialize()
at System.Web.Services.Protocols.ServerProtocol.SetCo ntext(Type type,
HttpContext context, HttpRequest request, HttpResponse response)
at System.Web.Services.Protocols.ServerProtocolFactor y.Create(Type type,
HttpContext context, HttpRequest request, HttpResponse response, Boolean&
abortProcessing)
JD Guest
-
Modify HttpGet and HttpPost portions of WSDL
Hi. Does anyone know a way to programmatically modify the HttpGet and HttpPost service ports in WSDL(In particular, I would like to modify the... -
HttpGet Vs HttpPost vs SOAP
There is a significant difference. With HTTP POST you can send true message-oriented SOAP requests, but with HTTP GET you can only send parameters... -
Error returning an XmlNode from a webservice
I am using WSE 2.0 and ASP.NET to consume two webservices. The first works fine 100% of the time - the second doesn't. The first has a signature... -
XmlNode in Web Services...
Requirements have made me to come up with a Web Service that accepts XML as input. Figured out that XmlNode is possible to work with and it works... -
XmlNode -> Schema -> Object
I apologize, this question pertains to WebServices only indirectly. Lets say I have an XmlNode that validates against some schema. I also have a... -
Bruce Johnson #2
HttpPOST fails when using XmlNode
This might seem silly, but have you tried changing the
name of the Echo method. The way the error message
reads, it sounds like Echo is some kind of reserved
word. Given the lack of anything better to try, it's the
first thing that I'd do.
Bruce Johnson
[url]http://www.ObjectSharp.com/Bruce[/url]
implementing this simple>-----Original Message-----
>Can someone explain why HTTP Post fails whenmethod name is not valid.>webmethod?
>[WebMethod]
>
>public XmlNode Echo(XmlNode doc) {
>
>return doc;
>
>}
>
>while the following works fine:
>
>[WebMethod]
>
>public XmlNode EchoDoc(string doc)
>
>{
>
>XmlDocument xmldoc = new XmlDocument();
>
>xmldoc.LoadXml(doc);
>
>return (XmlNode) xmldoc;
>
>}
>
>Configuration:
>
>ASP.NET 1.1 and
>
><add name="HttpPost"/> has been added to the web.config
>
>Here's the error I receive:
>
>System.InvalidOperationException: Echo Web ServiceSystem.Web.Services.Protocols.HttpServerProtocol.I nitializ> at
e()System.Web.Services.Protocols.ServerProtocol.SetCo ntext> at
(Type type,response)>HttpContext context, HttpRequest request, HttpResponseSystem.Web.Services.Protocols.ServerProtocolFactor y.Create> at
(Type type,response, Boolean&>HttpContext context, HttpRequest request, HttpResponse>abortProcessing)
>
>
>.
>Bruce Johnson Guest
-
JD #3
Re: HttpPOST fails when using XmlNode
Changing the name of the web method doesn't help. Same result. Surely
someone is sending an XML document to a web method. Is there another
recommended way to do this as a XML document rather than an encoded string?
"Bruce Johnson" <Bruce@ObjectSharp.removethis.com> wrote in message
news:0a7b01c3b9ad$2aef4330$a401280a@phx.gbl...> This might seem silly, but have you tried changing the
> name of the Echo method. The way the error message
> reads, it sounds like Echo is some kind of reserved
> word. Given the lack of anything better to try, it's the
> first thing that I'd do.
>
> Bruce Johnson
> [url]http://www.ObjectSharp.com/Bruce[/url]
>> implementing this simple> >-----Original Message-----
> >Can someone explain why HTTP Post fails when> method name is not valid.> >webmethod?
> >[WebMethod]
> >
> >public XmlNode Echo(XmlNode doc) {
> >
> >return doc;
> >
> >}
> >
> >while the following works fine:
> >
> >[WebMethod]
> >
> >public XmlNode EchoDoc(string doc)
> >
> >{
> >
> >XmlDocument xmldoc = new XmlDocument();
> >
> >xmldoc.LoadXml(doc);
> >
> >return (XmlNode) xmldoc;
> >
> >}
> >
> >Configuration:
> >
> >ASP.NET 1.1 and
> >
> ><add name="HttpPost"/> has been added to the web.config
> >
> >Here's the error I receive:
> >
> >System.InvalidOperationException: Echo Web Service> System.Web.Services.Protocols.HttpServerProtocol.I nitializ> > at
> e()> System.Web.Services.Protocols.ServerProtocol.SetCo ntext> > at
> (Type type,> response)> >HttpContext context, HttpRequest request, HttpResponse> System.Web.Services.Protocols.ServerProtocolFactor y.Create> > at
> (Type type,> response, Boolean&> >HttpContext context, HttpRequest request, HttpResponse> >abortProcessing)
> >
> >
> >.
> >
JD Guest



Reply With Quote

