On 17 Dec 2014, at 9:03 am, Stuart Tremain <webdna@idfk.com.au> =wrote:Hey TedI have been doing SOAP =on Linux & Windows servers for many years.There are few tricks that I have =come across that work depending on the way the SOAP server is =configured..Firstly this is a great tool for getting your query =correctSecondly, quite often I have made these =things work by putting in a browser type and content-length.Your TCP is =incorrectShould be POST /WeatherWS/Weather.asmxYou also have a space after your text =var name [text]SOAPRequest*you have a space here*=3D[UnURL]Try using =this:[tcpconnect =host=3D[HO-HOSTURL]&port=3D[HO-HOSTPORT]&ssl=3DF][!][/!][tcpsend skipheader=3DT]POST =/[SERVICENAME]/[SERVICENAME].svc?wsdl =HTTP/1.0[UnURL]%0D%0A[/UnURL][!][/!]Accept-Encoding:= gzip,deflate[UnURL]%0D%0A[/UnURL][!][/!]Content-Type: =text/xml;charset=3DUTF-8[UnURL]%0D%0A[/UnURL][!]I used SOAP UI to get this next line, =you may need to do the same[/!]SOAPAction: http://tempuri.org/I[SERVICENAME]/GetData[UnURL]%0D%0A[/UnURL][=!][/!]User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows =NT 5.0)[UnURL]%0D%0A[/UnURL][!][/!]Host: =[HO-HOSTURL]:[HO-HOSTPORT][UnURL]%0D%0A[/UnURL][!][/!]Content-Length: =[CountChars][SOAPRequest][/CountChars][UnURL]%0D%0A[/UnURL][!][/!][UnURL]%0D%0A[/UnURL][!][/!][SOAPRequest][UnURL]%0D%0A[/UnURL][!][/!][UnURL]%0D%0A[/UnURL][!][/!][/TCPSend][!][/!][/tcpconnect]HO-HOSTURL=3Dwsf.cdyne.comHO-HOSTPORT=3D80SERVICENAME=3DWeatherWS/Weather.asmx ---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing listOn 17 Dec 2014, at 3:41 am, mainlighting . <mainlighting@gmail.com> wrote:---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing listHas anyone been able to do SOAP requests =successfully from WebDNA? Below is an attempt with WebDNA to a =weather web service that fails (message: 'Data at the root level is invalid. Line 1, =position 1'). Is there something I am missing?[text]SOAPRequest ==3D[UnURL]%0D%0A[/UnURL][!]
[/!]<?xml version=3D"1.0" =encoding=3D"utf-8"?>[UnURL]%0D%0A[/UnURL][!]
[/!]<soap12:Envelope xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema"xmlns:soap12=3D"http://schemas.xmlsoap.org/soap/envelope/">[UnURL]%0D%0A=[/UnURL][!]
[/!]<soap12:Body>[UnURL]%0D%0A[/UnURL][!]
[/!]<ns1:GetCityForecastByZIP xmlns:ns1=3D'http://ws.cdyne.com/WeatherWS/'>[!]
[/!]<ns1:ZIP>11743</ns1:ZIP>[!]
[/!]</ns1:GetCityForecastByZIP>[!]
[/!]</soap12:Body>[!]
[/!]</soap12:Envelope>[/text]
[text]_SOAPResponse=3D[tcpconnect host=3Dwsf.cdyne.com&port=3D80]
[tcpsend]POST http://wsf.cdyne.com/WeatherWS/Weather.asmx =HTTP/1.1[UnURL]%0D%0A[/UnURL][!]
[/!]Host: wsf.cdyne.com =[UnURL]%0D%0A[/UnURL][!]
[/!]Content-type: =application/soap+xml; charset=3D"utf-8"[UnURL]%0D%0A[/UnURL][!]
[/!]Content-length: =[CountChars][SOAPRequest][/CountChars][UnURL]%0D%0A[/UnURL][!]
[/!][UnURL]%0D%0A[/UnURL][!]
[/!][unurl][SOAPRequest][/unurl][UnURL]%0D%0A[/UnURL][!]<=br class=3D""> [/!][/TCPSend]
[/tcpconnect][/text]
[!][showif =[p_returnVar]![raw][p_returnVar][/raw]]
[text =scope=3Dglobal][p_returnVar]=3D[convertchars =table=3Dstrip][_SOAPResponse][/convertchars][/text]
[/showif][/!]
<br>[_SOAPResponse]Ted
.To unsubscribe, E-mail to: =div>archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us .To unsubscribe, E-mail to: =div>archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us
|
On 17 Dec 2014, at 9:03 am, Stuart Tremain <webdna@idfk.com.au> =wrote:Hey TedI have been doing SOAP =on Linux & Windows servers for many years.There are few tricks that I have =come across that work depending on the way the SOAP server is =configured..Firstly this is a great tool for getting your query =correctSecondly, quite often I have made these =things work by putting in a browser type and content-length.Your TCP is =incorrectShould be POST /WeatherWS/Weather.asmxTry using =this:[tcpconnect =host=3D[HO-HOSTURL]&port=3D[HO-HOSTPORT]&ssl=3DF][!][/!][tcpsend skipheader=3DT]POST =/[SERVICENAME]/[SERVICENAME].svc?wsdl =HTTP/1.0[unurl]%0D%0A[/UnURL][!]I used SOAP UI to get this next line, =you may need to do the same[/!]SOAPAction: [unurl]%0D%0A[/UnURL][" =class=3D"">http://tempuri.org/I[SERVICENAME]/GetData[unurl]%0D%0A[/UnURL][=!][/!][/TCPSend][!][/!][/tcpconnect]HO-HOSTURL=3Dwsf.cdyne.comHO-HOSTPORT=3D80SERVICENAME=3DWeatherWS/Weather.asmx ---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing listOn 17 Dec 2014, at 3:41 am, mainlighting . <mainlighting@gmail.com> wrote:---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing listHas anyone been able to do SOAP requests =successfully from WebDNA? Below is an attempt with WebDNA to a =weather web service that fails (message: 'Data at the root level is invalid. Line 1, =position 1'). Is there something I am missing?[text]SOAPRequest ==3D[unurl]%0D%0A[/UnURL][!]
[/!]<?xml version=3D"1.0" =encoding=3D"utf-8"?>[unurl]%0D%0A[/UnURL][!]
[/!]<soap12:Envelope xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema"xmlns:soap12=3D"http://schemas.xmlsoap.org/soap/envelope/">[unurl]%0D%0A=[/UnURL][!]
[/!]<soap12:Body>[unurl]%0D%0A[/UnURL][!]
[/!]<ns1:GetCityForecastByZIP xmlns:ns1=3D'http://ws.cdyne.com/WeatherWS/'>[!]
[/!]<ns1:ZIP>11743</ns1:ZIP>[!]
[/!]</ns1:GetCityForecastByZIP>[!]
[/!]</soap12:Body>[!]
[/!]</soap12:Envelope>[/text]
[text]_SOAPResponse=3D[tcpconnect host=3Dwsf.cdyne.com&port=3D80]
[tcpsend]POST http://wsf.cdyne.com/WeatherWS/Weather.asmx =HTTP/1.1[unurl]%0D%0A[/UnURL][!]
[/!]Host: wsf.cdyne.com =[unurl]%0D%0A[/UnURL][!]
[/!]Content-type: =application/soap+xml; charset=3D"utf-8"[unurl]%0D%0A[/UnURL][!]
[/!]Content-length: =[countchars][SOAPRequest][/CountChars][unurl]%0D%0A[/UnURL][!]
[/!][unurl]%0D%0A[/UnURL][!]
[/!][unurl][SOAPRequest][/unurl][unurl]%0D%0A[/UnURL][!]<=br class=3D""> [/!][/TCPSend]
[/tcpconnect][/text]
[!][showif =[p_returnVar]![raw][p_returnVar][/raw]]
[text =scope=3Dglobal][p_returnVar]=3D[convertchars =table=3Dstrip][_SOAPResponse][/convertchars][/text]
[/showif][/!]
<br>[_SOAPResponse]Ted
.To unsubscribe, E-mail to: =div>archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us .To unsubscribe, E-mail to: =div>archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us
DOWNLOAD WEBDNA NOW!
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...