Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > .NET Client / Java Web Service Problem

Reply
Thread Tools

.NET Client / Java Web Service Problem

 
 
Jasmeet Sangari via .NET 247
Guest
Posts: n/a
 
      03-13-2005
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.SoapDocumentMethodAt tribute("urn:#solicitar",Use=System.Web.Services.D escription.SoapBindingUse.Literal,ParameterStyle=S ystem.Web.Services.Protocols.SoapParameterStyle.Ba re)]

[return: System.Xml.Serialization.XmlElementAttribute("Resp onse",Namespace="http://example")]
public stringsolicitar([System.Xml.Serialization.XmlElementAttribute(Names pace="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.Xm lSerializationReader1.Read117_Response()\r\n --- End of inner exception stacktrace ---\r\n atSystem.Xml.Serialization.XmlSerializer.Deseriali ze(XmlReaderxmlReader, String encodingStyle, XmlDeserializationEventsevents)\r\n atSystem.Xml.Serialization.XmlSerializer.Deseriali ze(XmlReaderxmlReader, XmlDeserializationEvents events)\r\n atSystem.Xml.Serialization.XmlSerializer.Deseriali ze(XmlReaderxmlReader)\r\n atSystem.Web.Services.Protocols.SoapHttpClientProt ocol.ReadResponse(SoapClientMessage message, WebResponse response, StreamresponseStream, Boolean asyncCall)\r\n atSystem.Web.Services.Protocols.SoapHttpClientProt ocol.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.Xm lSerializationReader1.Read117_Response()


Please help,

Regards,

Jasmeet


--------------------------------
From: Jasmeet Sangari

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>ENFfwlgO70CwB6Eqi6RnQg==</Id>
 
Reply With Quote
 
 
 
 
Dino Chiesa [Microsoft]
Guest
Posts: n/a
 
      03-14-2005
you need to examine the XML (response) that is being returned by the
service.
Try something like proxytrace, or the TCPMonitor tool in the Apache AXIS
toolkit.
etc

-D


"Jasmeet Sangari via .NET 247" <> wrote in message
news:...
Hi,
I am writting a .NET Client for a Java Web Service.I have created a .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.SoapDocumentMethodAt tribute("urn:#solicitar",
Use=System.Web.Services.Description.SoapBindingUse .Literal,
ParameterStyle=System.Web.Services.Protocols.SoapP arameterStyle.Bare)]

[return: System.Xml.Serialization.XmlElementAttribute("Resp onse",
Namespace="http://example")]
public string
solicitar([System.Xml.Serialization.XmlElementAttribute(Names pace="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 Error Like:::


Error in the Client:::::

"System.InvalidOperationException: There is an error in XML document (8,
5). ---> System.Xml.XmlException: 'Element' is an invalid node type. Line 8,
position 5.\r\n at System.Xml.XmlReader.ReadElementString()\r\n at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlS erializationReader1.Read117_Response()\r\n
--- End of inner exception stack trace ---\r\n at
System.Xml.Serialization.XmlSerializer.Deserialize (XmlReader xmlReader,
String encodingStyle, XmlDeserializationEvents events)\r\n at
System.Xml.Serialization.XmlSerializer.Deserialize (XmlReader xmlReader,
XmlDeserializationEvents events)\r\n at
System.Xml.Serialization.XmlSerializer.Deserialize (XmlReader xmlReader)\r\n
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall)\r\n
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)

System.InvalidOperationException: There is an error in XML document (8,
5) ---> System.Xml.XmlException: 'Element' is an invalid node type. Line 8,
position 5.\r\n at System.Xml.XmlReader.ReadElementString()\r\n at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlS erializationReader1.Read117_Response()


Please help,

Regards,

Jasmeet


--------------------------------
From: Jasmeet Sangari

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>ENFfwlgO70CwB6Eqi6RnQg==</Id>


 
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
Does timer in Web Service Global.asax block my Web Service from processing web-site requests? Leo Violette ASP .Net Web Services 0 04-17-2009 12:39 AM
InvocationTargetException when calling "new Service()" in Axis web service to call another web service Michael Averstegge Java 0 01-10-2006 11:05 PM
Web Service Client Cannot Connect to Web Service From Some Machine EagleRed@HighFlyingBirds.com ASP .Net Web Services 0 10-10-2005 11:15 PM
Serialization problem, VB.Net Client consuming Java Axis Web Service umhlali ASP .Net 0 05-27-2004 09:51 AM
Problem calling a .net web service from an existing java client. Chris Bardon ASP .Net Web Services 0 04-28-2004 02:09 PM



Advertisments