.NET Client / Java Web Service Problem

Discussion in 'ASP .Net Web Services' started by Jasmeet Sangari via .NET 247, Mar 13, 2005.

  1. 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


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

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

    <Id>ENFfwlgO70CwB6Eqi6RnQg==</Id>
    Jasmeet Sangari via .NET 247, Mar 13, 2005
    #1
    1. Advertising

  2. 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.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 string
    solicitar([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 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.XmlSerializationReader1.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.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
    message, WebResponse response, Stream responseStream, Boolean asyncCall)\r\n
    at System.Web.Services.Protocols.SoapHttpClientProtocol.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.XmlSerializationReader1.Read117_Response()


    Please help,

    Regards,

    Jasmeet


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

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

    <Id>ENFfwlgO70CwB6Eqi6RnQg==</Id>
    Dino Chiesa [Microsoft], Mar 14, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. umhlali
    Replies:
    0
    Views:
    2,031
    umhlali
    May 27, 2004
  2. Chris Bardon
    Replies:
    0
    Views:
    156
    Chris Bardon
    Apr 28, 2004
  3. Replies:
    0
    Views:
    196
  4. Curt K
    Replies:
    3
    Views:
    439
    John Saunders [MVP]
    Jun 15, 2007
  5. Leo Violette
    Replies:
    0
    Views:
    998
    Leo Violette
    Apr 17, 2009
Loading...

Share This Page