Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

SOAP CONNECTION to EU Web Serices

Hello I trying to use a SOAP connector to EU Web Service, but the service answer me with the following text and a don't konw why:

<soap:Envelope xmlns:soap="soap:ClientUnexpected" _mce_href="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault>... wrapper element {urn:ec.europa.eu:taxud:vies:services:checkVat}checkVat found.   Expected {urn:ec.europa.eu:taxud:vies:services:checkVat:types}checkVat.</faultstring></soap:Fault></soap:Body></soap:Envelope>

Can you help me?

The code that i developed is the following :

sub wsSOAP

set val=ActiveDocument.Fields("CountryCodes").GetPossibleValues

    countryID = val.Item(0).Text

    set val=ActiveDocument.Fields("VatCode").GetPossibleValues

    vatID = val.Item(0).Text

xmlToSend = ""

xmlToSend = xmlToSend & "<?xml version='1.0' encoding='utf-8'?>"

xmlToSend = xmlToSend & "<SOAP-ENV:Envelope  xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'  xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:tns1='urn:ec.europa.eu:taxud:vies:services:checkVat:types'>"

xmlToSend = xmlToSend & "<SOAP-ENV:Body>"

xmlToSend = xmlToSend & "<tns1:checkVat xmlns:tns1='urn:ec.europa.eu:taxud:vies:services:checkVat'>"

xmlToSend = xmlToSend & "<tns1:countryCode>" & countryID & "</tns1:countryCode>"

xmlToSend = xmlToSend & "<tns1:vatNumber>" & vatID & "</tns1:vatNumber>"

xmlToSend = xmlToSend & "</tns1:checkVat>"

xmlToSend = xmlToSend & "</SOAP-ENV:Body>"

xmlToSend = xmlToSend & "</SOAP-ENV:Envelope>"



set txt1 = ActiveDocument.Variables("vXMLSent")

txt1.setContent xmlToSend, true

end sub





0 Replies