hamsgi Posted April 7, 2011 Share Posted April 7, 2011 Hi there I'm struggling in calling a WEB SERVICE (SOAP) with AUTOIT. I tried many examples available in the internet but, unfortunately I could not make them work. I have a XML call which one works in XMLSPY (ALTOVA) but I don't know how to migrate it to AUTOIT (moreover get the results). Below the XML call <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"> <SOAP-ENV:Header> <m:login xmlns:m="http://summary.webservice.inventory.abc.de/xsd"> <m:loginid>user_id</m:loginid> <m:password>pwd</m:password> </m:login> </SOAP-ENV:Header> <SOAP-ENV:Body> <m:summary xmlns:m="http://summary.webservice.inventory.abc.de/xsd"> <m:criteria> <m:client>CLICODE</m:client> <m:groupedByClient>true</m:groupedByClient> <m:groupedBySite>true</m:groupedBySite> <m:includeNonConformGoods>true</m:includeNonConformGoods> <m:includeOrderFulfillment>true</m:includeOrderFulfillment> <m:monitoringAlertStatusRed>true</m:monitoringAlertStatusRed> <m:monitoringAlertStatusYellow>true</m:monitoringAlertStatusYellow> <m:monitoringAlertStatusBlue>true</m:monitoringAlertStatusBlue> <m:monitoringAlertStatusGreen>true</m:monitoringAlertStatusGreen> <m:monitoringNonAlertStatus>true</m:monitoringNonAlertStatus> <m:ownStockOnly>true</m:ownStockOnly> <m:pageSize>10</m:pageSize> <m:site>My site</m:site> </m:criteria> </m:summary> </SOAP-ENV:Body> </SOAP-ENV:Envelope> After the call I would get the response as shown below: <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header/> <soapenv:Body> <InventorySummaryResponse xmlns="http://summary.webservice.inventory.abc.de/xsd"> <moreResultsAvailable>false</moreResultsAvailable> <InventorySummaryLine> <client>CLICODE</client> <site>My Site</site> <article>50025555</article> <articleDescription>HUILE DOUCHE TRIPH MARACUJA 200ML</articleDescription> <available>474</available> <blocked>0</blocked> <inbound>0</inbound> <outbound>193</outbound> <openInbound>0</openInbound> <openOutbound>25</openOutbound> <openOutboundPartner>0</openOutboundPartner> <totalQty>667</totalQty> </InventorySummaryLine> </InventorySummaryResponse> </soapenv:Body> </soapenv:Envelope> Does somebody know how to make such SOAP call in AUTOIT? I need to prototype a project and this is the missing part to finish it. The WSDL file is attached. Thanks ahead for any input someone can provide. Ham SgiTest-InventorySummaryWebService-20071204B.wsdl.txt Link to comment Share on other sites More sharing options...
Zedna Posted April 8, 2011 Share Posted April 8, 2011 I worked with SOAP XML requests in PowerBuilder. Base concept is to send POST HTTP request (I used WinHttp.WinHttpRequest.5.1 COM object for this, see HTTP UDF for Autoit) and set a header to ls_header = 'Content-Type~tText/xml~n' + & 'SOAPAction~t#url/#action' and set XML as data in request. I'm sure you will find some examples here when you use Search feature. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now