WS Reference - incorrect type of parameter value

1C:Enterprise platform integration capabilities and techniques

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

Hello everyone,
I imported WS Reference:
https://en-testwebapi.poczta-polska.pl/websrv/en.wsdl
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  :(

Code
ssl = New OpenSSLSecureConnection();
   PocztaPolskaWS = WSReferences.PocztaPolskaTest.CreateWSProxy("http://e-nadawca.poczta-polska.pl","ElektronicznyNadawca","ENSoap",,,ssl,,);       
   PocztaPolskaWS.User = "user";
   PocztaPolskaWS.Password = "pass";

guidstring = PocztaPolskaWS.getGuid(1);  

 
#2
People who like this:0Yes/0No
Interested
Rating: 16
Joined: Dec 4, 2017
Company:

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:


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


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
 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.