Main > Forum > 1C:Enterprise Platform > 1C:Integration > WS Reference - incorrect type of parameter value

Forum

Search UsersRules
WS Reference - incorrect type of parameter value
#1
Active user
Points:: 0
Joined:: Sep 18, 2012

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);  

Profile
#2
Interested
Points:: 0
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:


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

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.