WS Reference - incorrect type of parameter value

If you wish to leave comments or ask questions, please log on or sign up.

1C:Enterprise platform integration capabilities and techniques

People who like this:0Yes/0No
Active user
Rating: 2
Joined: Sep 18, 2012

Hello everyone,
I imported WS Reference:
and called it PocztaPolskaTest.
I can connect to it but I have problem with getGuid operation. I don't understand why this operation does not work with parameter value = 1 (as below). I receive an error: "incorrect type of parameter". Why? Operation getGuid has parameter "ilosc" of int type and value 1 is int type, isn't it?
What is wrong and how should I write it? I tried many combinations but none of them works :(

ssl = New OpenSSLSecureConnection();
   PocztaPolskaWS = WSReferences.PocztaPolskaTest.CreateWSProxy("","ElektronicznyNadawca","ENSoap",,,ssl,,);       
   PocztaPolskaWS.User = "user";
   PocztaPolskaWS.Password = "pass";

guidstring = PocztaPolskaWS.getGuid(1);  

People who like this:0Yes/0No
Rating: 15
Joined: Dec 4, 2017

Dear Kris,

According to the WSDL schema of the web service, the data type of the getGuid method's return value is defined as follows:

<xsd:element name="getGuidResponse">
         <xsd:element name="guid" type="tns:guidType" maxOccurs="100" minOccurs="1" />

In other words, it is an array.

To work with the getGuid method from your code, you should create an element that corresponds to the method and pass an appropriate value to its incoming parameter.

Best regards,
Vladimir Gurov

1C Company support team