Thanks Brian, It works! Even though the solution had looked more appealing with SoapSetParameters...
stupid me thinking SOAP and XML was some kind of standard.... Bjvrn Eklund -----Ursprungligt meddelande----- Fren: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Brian Leach Skickat: den 16 augusti 2007 12:31 Till: [email protected] Dmne: RE: [U2] [UD7.1] [Solaris 9]SOAP calls Bjorn The problem is that the remote service doesn't understand the way UniVerse is qualifying the method. The packet generated using SoapSetRequestParameters has the method name qualified thus: <ns1:ConvertSpeed xmlns:ns1="http://www.webserviceX.NET/" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> That service only understands it as: <ConvertSpeed xmlns="http://www.webserviceX.NET/" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> I guess it's really a limitation on the remote service. You can get round it the more painful way by using SoapSetRequestContent : ret = SOAPSetDefault("VERSION","1.1") IF ret <> 0 THEN STOP "FEL I SOAP SetDefault ":Ret END URL = "http://www.webservicex.net/ConvertSpeed.asmx?wsdl" SoapAction = "http://www.webserviceX.NET/ConvertSpeed" Method = "ConvertSpeed" Timeout = 30000 NameSpace = "http://www.webserviceX.NET/" Ret = SoapCreateRequest(URL, SoapAction, SoapReq) IF Ret <> 0 THEN STOP "FEL I SOAP REQUEST ":Ret END Content = \<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"><soap:Body><ConvertSpeed xmlns="http://www.webserviceX.NET/" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><speed xsi:type="xsd:double">{SPEED}</speed><FromUnit xsi:type="xsd:string">milesPerhour</FromUnit><ToUnit xsi:type="xsd:string">metersPersecond</ToUnit></ConvertSpeed></soap:Body></s oap:Envelope>\ Content = Change(Content, "{SPEED}", 12) Ret = SoapSetRequestContent(SoapReq, Content, 1) IF Ret <> 0 THEN STOP "FEL I SOAP SetParam ":Ret END Ret = SoapSubmitRequest(SoapReq, Timeout, RespHeaders, RespData, SoapStatus) IF Ret <> 0 THEN STOP "FEL I SOAP SubmitReq ":Ret END PRINT "Resp status : ":SoapStatus PRINT "Response headers : ":RespHeaders PRINT "Response data : ":RespData Brian ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
