J
Jasmeet Sangari via .NET 247
Hi,
I am writting a .NET Client for a Java Web Service.I have createda .cs file from the WSDL and the XSD's Given.
I am trying to query a Web Service which has the description:::
// Service Description:::::::
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:#solicitar",Use=System.Web.Services.Description.SoapBindingUse.Literal,ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)]
[return: System.Xml.Serialization.XmlElementAttribute("Response",Namespace="http://example")]
public stringsolicitar([System.Xml.Serialization.XmlElementAttribute(Namespace="http://example")] idMesage Mesage) {
object[] results = this.Invoke("Function", new object[]{Mesage});
return ((string)(results[0]));
But when I query the Web Service from my Client I get an ErrorLike:::
Error in the Client:::::
"System.InvalidOperationException: There is an error in XMLdocument (8, 5). ---> System.Xml.XmlException: 'Element' is aninvalid node type. Line 8, position 5.\r\n atSystem.Xml.XmlReader.ReadElementString()\r\n atMicrosoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read117_Response()\r\n --- End of inner exception stacktrace ---\r\n atSystem.Xml.Serialization.XmlSerializer.Deserialize(XmlReaderxmlReader, String encodingStyle, XmlDeserializationEventsevents)\r\n atSystem.Xml.Serialization.XmlSerializer.Deserialize(XmlReaderxmlReader, XmlDeserializationEvents events)\r\n atSystem.Xml.Serialization.XmlSerializer.Deserialize(XmlReaderxmlReader)\r\n atSystem.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, StreamresponseStream, Boolean asyncCall)\r\n atSystem.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
System.InvalidOperationException: There is an error in XMLdocument (8, 5) ---> System.Xml.XmlException: 'Element' is aninvalid node type. Line 8, position 5.\r\n atSystem.Xml.XmlReader.ReadElementString()\r\n atMicrosoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read117_Response()
Please help,
Regards,
Jasmeet
I am writting a .NET Client for a Java Web Service.I have createda .cs file from the WSDL and the XSD's Given.
I am trying to query a Web Service which has the description:::
// Service Description:::::::
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:#solicitar",Use=System.Web.Services.Description.SoapBindingUse.Literal,ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)]
[return: System.Xml.Serialization.XmlElementAttribute("Response",Namespace="http://example")]
public stringsolicitar([System.Xml.Serialization.XmlElementAttribute(Namespace="http://example")] idMesage Mesage) {
object[] results = this.Invoke("Function", new object[]{Mesage});
return ((string)(results[0]));
But when I query the Web Service from my Client I get an ErrorLike:::
Error in the Client:::::
"System.InvalidOperationException: There is an error in XMLdocument (8, 5). ---> System.Xml.XmlException: 'Element' is aninvalid node type. Line 8, position 5.\r\n atSystem.Xml.XmlReader.ReadElementString()\r\n atMicrosoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read117_Response()\r\n --- End of inner exception stacktrace ---\r\n atSystem.Xml.Serialization.XmlSerializer.Deserialize(XmlReaderxmlReader, String encodingStyle, XmlDeserializationEventsevents)\r\n atSystem.Xml.Serialization.XmlSerializer.Deserialize(XmlReaderxmlReader, XmlDeserializationEvents events)\r\n atSystem.Xml.Serialization.XmlSerializer.Deserialize(XmlReaderxmlReader)\r\n atSystem.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, StreamresponseStream, Boolean asyncCall)\r\n atSystem.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
System.InvalidOperationException: There is an error in XMLdocument (8, 5) ---> System.Xml.XmlException: 'Element' is aninvalid node type. Line 8, position 5.\r\n atSystem.Xml.XmlReader.ReadElementString()\r\n atMicrosoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read117_Response()
Please help,
Regards,
Jasmeet