Consuming Web Services

I have been trying to consume a web service with Soap from the address http://201.130.71.149:8082/factoryAdquem/services/UnicreichWs?wsdl.
I have tried various methods to get the W.S., i.e.:

wsPrueba.Cliente[] WSer;

wsPrueba.UnicreichWsService prueba = new wsPrueba.UnicreichWsService ();

WSer = prueba.getClientes("12","00:11:7F:24:b4:23");

WSer = prueba.getAllClientes ();

My problem is that when debug and check the contents of my data i get all fields null or false or 0. I have already checked the web service with soapUI and it is all fine there. On soapUI i get 5 clients with their respective data, while trying the above code i get the 5 clients with null data.

I am very new to Xamarin and would aprecciate your help a lot!!! Thanks in advance and sorry for any misspelling errors!!!

Posts

  • BernardoGuerreroBernardoGuerrero USMember

    Ohhh, i forgot to paste another lines of code i use, after calling the Web Reference i put:

    var WSer = new AdqWebSer.UnicreichWsClient ();
    var MyClientsData = WSer.getClientes("12", "00:11:7F:24:b4:23");

  • WilleWille DEMember ✭✭
    edited May 2013

    Hi there,

    I used the automated proxygenerationtool built in Xamarin to consume a webservice.
    I had the same problem, that some complex objects had null-attributes. I dont know where exactlyn the problem is, since the needed class with all its attributes is generated in the proxy. But setting them fails. This occures on XS (MAC) and VS (Win) and I assume on XS (Win), too.

    Since simple data-types were received correctly, I modified my webservice to send a JSON-string instead of objects.
    This works fine, maybe you should try this, too.

    Here are some samples, if you don´t already know this document:
    http://docs.xamarin.com/guides/cross-platform/application_fundamentals/introduction_to_web_services

    Greetins,
    Wille

Sign In or Register to comment.