Click here to Skip to main content
15,916,462 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Good morning.

I'm in trouble to receive the response from a Web service.

The service is written in Python, and the client is going to consume is being written with Visual Basic. Net

Others are using this service, I say that to make clear that the problem I have is writing the client, so the service is working well.

The main problem is that apparently did not receive the service response. The object returned in response to my call is Nothing.

But using a like-sniffer program to capture the HTTP traffic, and it works very well as Fiddler, I can see that my request is launched successfully, and most importantly, I'm getting a correct answer.

In other words, the response from service returns successfully, but in my proxy class or at the time to parse the answer given some error, and for that reason returns Nothing instead of returning the corresponding object type.

Then I leave here the SOAP response received, I can capture using Fiddler, if someone notices something strange:

<soap-env:envelope xmlns:soap-env="#unknown">
     xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
     xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
     xmlns:ZSI="http://www.zolera.com/schemas/ZSI/"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soap-env:header></soap-env:header>
      <soap-env:body>
        <librovendidoresponse soap-enc:arraytype="xsd:anyType[1]" xsi:type="SOAP-ENC:Array" xmlns:xsi="#unknown" xmlns:soap-enc="#unknown">
          <element id="oef5eaf8" xsi:type="xsd:string">http://www.urlprueba.com</element>
        </librovendidoresponse>
      </soap-env:body>
</soap-env:envelope>


Finally, I have been reviewing this link: http://www.primordialcode.com/index.php/2008/10/15/invoking-javaaxis-web-service-net-return-null-issue

Apparently, the problem here is that the proxy class has specified a namespace, and instead, the SOAP response specifies that to an empty string namespace, and therefore do not match.
The solution is to modify the proxy class, leaving the namespace as an empty string, like the SOAP response, and thus solves the problem.

But I think in my case it must be something different because, in the SOAP response, I can not see any namespace specified in the method libroVendidoResponse, if I see only this:

<librovendidoresponse soap-enc:arraytype="xsd:anyType[1]" xsi:type="SOAP-ENC:Array" xmlns:xsi="#unknown" xmlns:soap-enc="#unknown"></librovendidoresponse>


And I can not see how I can change my proxy class to stop returning Nothing, and return the right object types.

P.D.: This is the class header and the method header, all the code generated automatically:

<system.codedom.compiler.generatedcodeattribute("system.web.services",>     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Web.Services.WebServiceBindingAttribute(Name:="DBSOAPMethods", [Namespace]:="digitalbooks.theme.browser.webservice.soap.DBSOAPMethods")>  _
    Partial Public Class DBSOAPMethods
        Inherits System.Web.Services.Protocols.SoapHttpClientProtocol
[...].
<system.web.services.protocols.soapdocumentmethodattribute("librovendido",> _
        Public Function libroVendido(<system.xml.serialization.xmlelementattribute("librovendido",> ByVal libroVendido1 As libroVendido) As <system.xml.serialization.xmlelementattribute("librovendidoresponse",> libroVendidoResponse
            Dim results() As Object = Me.Invoke("libroVendido", New Object() {libroVendido1})
            Return CType(results(0), libroVendidoResponse)
        End Function
[...].


Thank you very much for the help you can provide me.

Greetings.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900