Re: [WebDNA] XML Help
This WebDNA talk-list message is from 2009
It keeps the original formatting.
numero = 103612
interpreted = N
texte = This is a cryptographically signed message in MIME format.--------------ms030708030907010708090308Content-Type: text/plain; charset=UTF-8Content-Transfer-Encoding: quoted-printableYou need to save the xml response to file.What I did was to save the xml you posted to a file named example1.xml. Then in a WebDNA page (.tpl or .dna) I entered the code sample I sentyou. Then in my browser navigated to the WebDNA page. Here's what isreturned:Version=3D2.0TransactionHeader=3D- SenderID=3DYOU- ReceiverID=3DMD- ErrorStatus=3D- DocumentID=3D{15A0E750-AA64-4855-873C-3D1B6F811AB7}- TransactionID=3D12345- TimeStamp=3D2009-09-11T10:22:15PriceAndAvailability=3D- Price=3D236.93- SpecialPriceFlag=3D- GovEdSpecialPrice=3DY- ManufacturerPartNumber=3DCE462A#ABA- ManufacturerPartNumberOccurs=3D- VendorNumber=3D2822- Description=3DP2035N LASER 30PPM 1200X- ReserveInventoryFlag=3DN- AvailableRebQty=3D0- Branch=3D- Branch=3D- Branch=3D- Branch=3D- Branch=3DLooking at the code you have below, it looks like you're trying to sendxml to newport.ingrammicro.com over ssl. Is it supposed to returnsomething? If so what? If it's returning xml, then save that responsedata to file and then reference that file here:[xmlparse var=3Dxml_var1][include file=3DtheResponse.xml][/xmlparse]What that does is to save the xml object within the variable namedxml_var1. Then you use xmlnodes to extract that data from that object.MarcMark Bergkvist wrote:> Thank Marc,>=20> Here is the code I have so far:>=20>=20> [text]crlf=3D[unurl]%0D%0A[/unurl][/text]> [text]content=3D
> 2.0> > MD> YOU> MD> MyID> MyPASSORD> 12345> > GovtEndUserType=3D"F" />> 1> [/text]>=20>=20> [tcpconnect host=3Dnewport.ingrammicro.com&port=3D443&ssl=3DT]> [tcpsend skipheader=3DT][!]> [/!]POST /mustang HTTP/1.0[crlf][!]> [/!]Host: [host][crlf][!]> [/!]Content-Length: [CountChars][content][/CountChars][crlf][!]> [/!][crlf][!]> [/!][content][!]> [/!][/tcpsend]> [/tcpconnect]>=20>
> [xmlparse var=3Dxml_var1][include file=3Dexample1.xml][/xmlpars=e]> [xmlnodes ref=3Dxml_var1&path=3Dnamed:PNAResponse]> [name]=3D[value]
> [xmlnodes]> - [name]=3D[value]
>=20> [/xmlnodes]> [/xmlnodes]>=20> And here is what gets displayed in the brower:>=20> 2.0YOUMD{94B065A3-E5CB-4B45-9CB7-3C34848F9500}123452009-09-11T1=1:53:47236.93YCE462A#ABA2822P2035N LASER 30PPM 1200XN0-17273152009-10-05-=660-3861402009-11-09-3601402009-11-16-10213852009-09-14>=20>=20> Fatal Error at file> line: 1> column: 1> message: Invalid document structure> An unknown error occurred:> XMLNodes> Container/Path Not Found:> xml_var1>=20> I have referred to documentation and I guess I still don't quite fully =understand. Where does the example1.xml file come from? I think I am st=ill missing a piece of the puzzle...>=20> Thanks,>=20> Mark>=20>=20> -----Original Message-----> From: Marc Thompson [mailto:mthompson@media.utah.edu]> Sent: Friday, September 11, 2009 2:00 PM> To: talk@webdna.us> Subject: Re: [WebDNA] XML Help>=20> Mark,> Be sure to visit the documentation for xmlparse and xml nodes. They> will explain how to parse the XML.>=20> Try this:>=20> [xmlparse var=3Dxml_var1][include file=3Dexample1.xml][/xmlpars=e]> [xmlnodes ref=3Dxml_var1&path=3Dnamed:PNAResponse]> [name]=3D[value]
> [xmlnodes]> - [name]=3D[value]
>=20> [/xmlnodes]> [/xmlnodes]>=20> Marc>=20> Mark Bergkvist wrote:>> Thank you Chris! This seemed to work. I now get this data returned:>>>> >>
2.0YOUMD{15A0E750-AA64-4855-873C-3D1B6F811AB7}123452009-09-11T10:22:15236.93YCE462A#ABA2822P2035N LASER 30PPM 1200XN0-1727=3152009-10-05-66 ity>0-3861=402009-11-09-3601402009-11-16-10183852009-09-14>> Now for parsing this, I am just as lost. I have look at the XML comma=nds and the example Donovan mentioned but still need some guidance. With =this XML response above would I now have to write this to a file or datab=ase in order to display the results the way I want them?>>>> I have tried>> [xmlparse var=3Dxml_var1][include file=3Dexample1.xml][/xmlpar=se]>> [xmlnodes ref=3Dxml_var1]>> [name]=3D[value]>> [/xmlnodes]>> And just get the following error:>> Fatal Error at file>> line: 1>> column: 1>> message: Invalid document structure>> An unknown error occurred:>> XMLNodes>> Container/Path Not Found:>> xml_var1>>>> Sorry if these are stupid questions, but this is my first attempt at w=orking with XML.>>>> Mark>>>>>> -----Original Message----->> From: Christer Olsson [mailto:christer@ljusaideer.se]>> Sent: Friday, September 11, 2009 1:29 AM>> To: talk@webdna.us>> Subject: Re: [WebDNA] XML Help>>>> Just sending your example would be something like this:>>>> [text]crlf=3D[unurl]%0D%0A[/unurl][/text]>> [text]content=3D>> 2.0>> >> MD>> YOU>> MD>> MyId>> MyPassword>> 12345>> >> > GovtEndUserType=3D"F" />>> 1>> [/text]>>>> [tcpconnect host=3Dnewport.ingrammicro.com&port=3D443&ssl=3DT]>> [tcpsend skipheader=3DT][!]>> [/!]POST /mustang HTTP/1.0[crlf][!]>> [/!]Host: [host][crlf][!]>> [/!]Content-Length: [CountChars][content][/CountChars][crlf][!]>> [/!][crlf][!]>> [/!][content][!]>> [/!][/tcpsend]>> [/tcpconnect]>>>> For parsing the XML responses you get back you'll have to learn and>> use the XML portions of WebDNA.>>>> Best,>> Christer>>>> *************************************************************>> Christer Olsson PO Box 9160 Phone +46 40 25 85 85>> Ljusa Id=C3=A9er AB SE-200 39 Malmo Fax +46 40 25 85 89>> Kantyxegatan 5 Sweden http://www.ljusaideer.se>>>>>>>> 11 sep 2009 kl. 01.55 skrev Mark Bergkvist:>>>>> Govinda,>>>>>> I have looked at some of these tags and think I might need to use>>> them. Guess I am really just lost when it comes down to how to send>>> a request and just get some kind of response back, even if it is an>>> error message from them, at least I would know that I am "talking">>> with their server... I have played around with the [TCPonnect]>>> commands but just get a "Error" couldn't connect to host" message.>>> Again, I am not even sure if this is the right road to go down...>>>>>> The vendor I am trying to connect with does provide a "test Tool">>> when I can paste the code (PNArequest below) and it does give a>>> valid response. But I don't know how to get my server to talk to>>> them to get the same response back.>>>>>> Mark>>>>>>>>> -----Original Message----->>> From: Govinda [mailto:govinda.webdnatalk@gmail.com]>>> Sent: Thursday, September 10, 2009 7:39 PM>>> To: talk@webdna.us>>> Subject: Re: [WebDNA] XML Help>>>>>> mark>>>>>> I also am XML newbie (not even started)..>>> but start with this thought:>>> webdna can produce any text you could need. You make webdna generate=>>> whatever text you need to look like whatever you need it to look like=>>> (whether HTML, javascript, XML, or anything.)>>>>>> There are also special XML tags in webdna, like>>> [XMLNodes]>>> and others.. but I have never looked into them.. They may make your>>> job even easier. (in reading or writing xml.. ?)>>> also there is a tag called [TCPConnect] you can use to connect>>> directly to a server. But if you are just posting a form to them>>> though, then you do not need that.>>>>>> dive in and ask more Q's as you encounter them. maybe read something=>>> introductory about XML so you can separate out Webdna Q's from XML>>> Q's.>>>>>> -Govinda>>>>>> On Sep 10, 2009, at 4:49 PM, Mark Bergkvist wrote:>>>>>>> Not sure if anyone can help, but I need to connect to a supplier via=>>>> XML using an HTTP-POST command to get pricing information from.>>>>>>>> I know nothing about XML and not even sure if this is a WebDNA>>>> question.>>>>>>>> Here is the sample document they sent me to work with. They did>>>> also provide me with a URL and username/password to connect with.>>>>>>>> >>>> 2.0>>>> >>>> MD>>>> YOU>>>> MD>>>> MyId>>>> MyPassword>>>> 12345>>>> >>>> >>> GovtEndUserType=3D"F" />>>>> 1>>>> >>>>>>>>>>>> Anyone have any ideas where I should start?>>>>>>>> Windows 2003 IIS server>>>> WebDNA 6.2.0>>>>>>>>>>>> Mark>>>> --------------------------------------------------------->>>> This message is sent to you because you are subscribed to>>>> the mailing list .>>>> To unsubscribe, E-mail to: >>>> archives: http://mail.webdna.us/list/talk@webdna.us>>>> old archives: http://dev.webdna.us/TalkListArchive/>>>> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&cate=gory=3D288>>> ------------>>> Govinda>>> govinda.webdnatalk@gmail.com>>>>>>>>>>>>>>> --------------------------------------------------------->>> This message is sent to you because you are subscribed to>>> the mailing list .>>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us>>> old archives: http://dev.webdna.us/TalkListArchive/>>> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&categ=ory=3D288>>> --------------------------------------------------------->>> This message is sent to you because you are subscribed to>>> the mailing list .>>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us>>> old archives: http://dev.webdna.us/TalkListArchive/>>> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&categ=ory=3D288>> --------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us>> old archives: http://dev.webdna.us/TalkListArchive/>> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&catego=ry=3D288>> --------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us>> old archives: http://dev.webdna.us/TalkListArchive/>> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&catego=ry=3D288>> .>>>=20> --> -------------------------------------------> Marc Thompson> Software Engineer> Office of Information Technology> University of Utah> 801.585.9264> marc.thompson@utah.edu> ------------------------------------------->=20> N=18=EF=BF=BD=EF=BF=BD=EF=BF=BD,j=07=EF=BF=BD=EF=BF=BD=C7=A7=EF=BF=BD=EF==BF=BD2=EF=BF=BD=EF=BF=BD=EF=BF=BDq=EF=BF=BD=EF=BF=BD{*.j=EF=BF=BD=EF=BF=BD==EF=BF=BD=EF=BF=BD=1C=EF=BF=BD&=EF=BF=BDv=EF=BF=BD-=EF=BF=BD=E9=9A=8AX=EF==BF=BD=EF=BF=BDX=EF=BF=BD=EF=BF=BD=D6=A5=EF=BF=BD=07=EF=BF=BDvv=EF=BF=BD=EF==BF=BD:.=EF=BF=BD=CB=9B=EF=BF=BD=EF=BF=BD=EF=BF=BDm=EF=BF=BD&j)m=EF=BF=BD==D6=A5=EF=BF=BDW=EF=BF=BD=EF=BF=BD=EF=BF=BD=1Em=EF=BF=BD=DA=BA=C6=ABr=18=EF==BF=BDz=EF=BF=BDm=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF==BF=BD=EF=BF=BD=DD=9D=EF=BF=BD=EF=BF=BD=EF=BF=BDX=EF=BF=BD=EF=BF=BD=EF=BF==BDZ=EF=BF=BDL=1Em=EF=BF=BD=DA=BA=EF=BF=BD%u=EF=BF=BD=DC=86+=DE=B2=1Bm=EF==BF=BD=EF=BF=BD=EF=BF=BDz=EF=BF=BD=1Em=EF=BF=BD=DA=BA=EF=BF=BD=EF=BF=BDjY= =EF=BF=BD=EF=BF=BD@=EF=BF=BD=EF=BF=BDb=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD==04^=EF=BF=BD=EF=BF=BD=EF=BF=BDx!=EF=BF=BD=EF=BF=BD=7F=EF=BF=BD=EF=BF=BD+==EF=BF=BDl=1Em=EF=BF=BD=DA=BA=EF=BF=BD=DE=B9=C6=9Bn=1Bf=EF=BF=BD=EF=BF=BD==EF=BF=BDz=EF=BF=BD)=EF=BF=BD=EF=BF=BD=1Cj=D7=A0=EF=BF=BD=EF=BF=BD=EF=BF=BD=--=20-------------------------------------------Marc ThompsonSoftware EngineerOffice of Information TechnologyUniversity of Utah801.585.9264marc.thompson@utah.edu---------------------------------------------------------ms030708030907010708090308Content-Type: application/x-pkcs7-signature; name="smime.p7s"Content-Transfer-Encoding: base64Content-Disposition: attachment; filename="smime.p7s"Content-Description: S/MIME Cryptographic SignatureMIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIIyTCCAr8wggIooAMCAQICEBsJjtdroK6bD6QFOjpu3bIwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UEBhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAM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BglghkgBZQMEAQIwCgYIKoZIhvcNAwcwDgYIKoZIhvcNAwICAgCAMA0GCCqGSIb3DQMCAgFAMAcGBSsOAwIHMA0GCCqGSIb3DQMCAgEoMIGFBgkrBgEEAYI3EAQxeDB2MGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3dGUgQ29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1haWwgSXNzdWluZyBDQQIQGwmO12ugrpsPpAU6Om7dsjCBhwYLKoZIhvcNAQkQAgsxeKB2MGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3dGUgQ29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1haWwgSXNzdWluZyBDQQIQGwmO12ugrpsPpAU6Om7dsjANBgkqhkiG9w0BAQEFAASBgHtwhcrNMiriAP2D67LhO82bijUsZdrf/h14XGcAs46+YHur+5wjQlwaevt8YM760WtJKEFlL000Gx8iS5Ndhccw9b4THUIMwzeBUF1f0CZur81faIHJOOuXksi0sD7UUGNKMgefFagCsE4dYQhnMDG6iOx8OYLfbxuAAc0/p5/mAAAAAAAA--------------ms030708030907010708090308--
Associated Messages, from the most recent to the oldest:
This is a cryptographically signed message in MIME format.--------------ms030708030907010708090308Content-Type: text/plain; charset=UTF-8Content-Transfer-Encoding: quoted-printableYou need to save the xml response to file.What I did was to save the xml you posted to a file named example1.xml. Then in a WebDNA page (.tpl or .dna) I entered the code sample I sentyou. Then in my browser navigated to the WebDNA page. Here's what isreturned:Version=3D2.0TransactionHeader=3D- SenderID=3DYOU- ReceiverID=3DMD- ErrorStatus=3D- DocumentID=3D{15A0E750-AA64-4855-873C-3D1B6F811AB7}- TransactionID=3D12345- TimeStamp=3D2009-09-11T10:22:15PriceAndAvailability=3D- Price=3D236.93- SpecialPriceFlag=3D- GovEdSpecialPrice=3DY- ManufacturerPartNumber=3DCE462A#ABA- ManufacturerPartNumberOccurs=3D- VendorNumber=3D2822- Description=3DP2035N LASER 30PPM 1200X- ReserveInventoryFlag=3DN- AvailableRebQty=3D0- Branch=3D- Branch=3D- Branch=3D- Branch=3D- Branch=3DLooking at the code you have below, it looks like you're trying to sendxml to newport.ingrammicro.com over ssl. Is it supposed to returnsomething? If so what? If it's returning xml, then save that responsedata to file and then reference that file here:[xmlparse var=3Dxml_var1][include file=3DtheResponse.xml][/xmlparse]What that does is to save the xml object within the variable namedxml_var1. Then you use xmlnodes to extract that data from that object.MarcMark Bergkvist wrote:> Thank Marc,>=20> Here is the code I have so far:>=20>=20> [text]crlf=3D[unurl]%0D%0A[/unurl][/text]> [text]content=3D> 2.0> > MD> YOU> MD> MyID> MyPASSORD> 12345> > GovtEndUserType=3D"F" />> 1> [/text]>=20>=20> [tcpconnect host=3Dnewport.ingrammicro.com&port=3D443&ssl=3DT]> [tcpsend skipheader=3DT][!]> [/!]POST /mustang HTTP/1.0[crlf][!]> [/!]Host: [host][crlf][!]> [/!]Content-Length: [countchars][content][/CountChars][crlf][!]> [/!][crlf][!]> [/!][content][!]> [/!][/tcpsend]> [/tcpconnect]>=20>
> [xmlparse var=3Dxml_var1][include file=3Dexample1.xml][/xmlpars=e]> [xmlnodes ref=3Dxml_var1&path=3Dnamed:PNAResponse]> [name]=3D[value]
> [xmlnodes]> - [name]=3D[value]
>=20> [/xmlnodes]> [/xmlnodes]>=20> And here is what gets displayed in the brower:>=20> 2.0YOUMD{94B065A3-E5CB-4B45-9CB7-3C34848F9500}123452009-09-11T1=1:53:47236.93YCE462A#ABA2822P2035N LASER 30PPM 1200XN0-17273152009-10-05-=660-3861402009-11-09-3601402009-11-16-10213852009-09-14>=20>=20> Fatal Error at file> line: 1> column: 1> message: Invalid document structure> An unknown error occurred:> XMLNodes> Container/Path Not Found:> xml_var1>=20> I have referred to documentation and I guess I still don't quite fully =understand. Where does the example1.xml file come from? I think I am st=ill missing a piece of the puzzle...>=20> Thanks,>=20> Mark>=20>=20> -----Original Message-----> From: Marc Thompson [mailto:mthompson@media.utah.edu]> Sent: Friday, September 11, 2009 2:00 PM> To: talk@webdna.us> Subject: Re: [WebDNA] XML Help>=20> Mark,> Be sure to visit the documentation for xmlparse and xml nodes. They> will explain how to parse the XML.>=20> Try this:>=20> [xmlparse var=3Dxml_var1][include file=3Dexample1.xml][/xmlpars=e]> [xmlnodes ref=3Dxml_var1&path=3Dnamed:PNAResponse]> [name]=3D[value]
> [xmlnodes]> - [name]=3D[value]
>=20> [/xmlnodes]> [/xmlnodes]>=20> Marc>=20> Mark Bergkvist wrote:>> Thank you Chris! This seemed to work. I now get this data returned:>>>> >> 2.0YOUMD{15A0E750-AA64-4855-873C-3D1B6F811AB7}123452009-09-11T10:22:15236.93YCE462A#ABA2822P2035N LASER 30PPM 1200XN0-1727=3152009-10-05-66 ity>0-3861=402009-11-09-3601402009-11-16-10183852009-09-14>> Now for parsing this, I am just as lost. I have look at the XML comma=nds and the example Donovan mentioned but still need some guidance. With =this XML response above would I now have to write this to a file or datab=ase in order to display the results the way I want them?>>>> I have tried>> [xmlparse var=3Dxml_var1][include file=3Dexample1.xml][/xmlpar=se]>> [xmlnodes ref=3Dxml_var1]>> [name]=3D[value]>> [/xmlnodes]>> And just get the following error:>> Fatal Error at file>> line: 1>> column: 1>> message: Invalid document structure>> An unknown error occurred:>> XMLNodes>> Container/Path Not Found:>> xml_var1>>>> Sorry if these are stupid questions, but this is my first attempt at w=orking with XML.>>>> Mark>>>>>> -----Original Message----->> From: Christer Olsson [mailto:christer@ljusaideer.se]>> Sent: Friday, September 11, 2009 1:29 AM>> To: talk@webdna.us>> Subject: Re: [WebDNA] XML Help>>>> Just sending your example would be something like this:>>>> [text]crlf=3D[unurl]%0D%0A[/unurl][/text]>> [text]content=3D>> 2.0>> >> MD>> YOU>> MD>> MyId>> MyPassword>> 12345>> >> > GovtEndUserType=3D"F" />>> 1>> [/text]>>>> [tcpconnect host=3Dnewport.ingrammicro.com&port=3D443&ssl=3DT]>> [tcpsend skipheader=3DT][!]>> [/!]POST /mustang HTTP/1.0[crlf][!]>> [/!]Host: [host][crlf][!]>> [/!]Content-Length: [countchars][content][/CountChars][crlf][!]>> [/!][crlf][!]>> [/!][content][!]>> [/!][/tcpsend]>> [/tcpconnect]>>>> For parsing the XML responses you get back you'll have to learn and>> use the XML portions of WebDNA.>>>> Best,>> Christer>>>> *************************************************************>> Christer Olsson PO Box 9160 Phone +46 40 25 85 85>> Ljusa Id=C3=A9er AB SE-200 39 Malmo Fax +46 40 25 85 89>> Kantyxegatan 5 Sweden http://www.ljusaideer.se>>>>>>>> 11 sep 2009 kl. 01.55 skrev Mark Bergkvist:>>>>> Govinda,>>>>>> I have looked at some of these tags and think I might need to use>>> them. Guess I am really just lost when it comes down to how to send>>> a request and just get some kind of response back, even if it is an>>> error message from them, at least I would know that I am "talking">>> with their server... I have played around with the [TCPonnect]>>> commands but just get a "Error" couldn't connect to host" message.>>> Again, I am not even sure if this is the right road to go down...>>>>>> The vendor I am trying to connect with does provide a "test Tool">>> when I can paste the code (PNArequest below) and it does give a>>> valid response. But I don't know how to get my server to talk to>>> them to get the same response back.>>>>>> Mark>>>>>>>>> -----Original Message----->>> From: Govinda [mailto:govinda.webdnatalk@gmail.com]>>> Sent: Thursday, September 10, 2009 7:39 PM>>> To: talk@webdna.us>>> Subject: Re: [WebDNA] XML Help>>>>>> mark>>>>>> I also am XML newbie (not even started)..>>> but start with this thought:>>> webdna can produce any text you could need. You make webdna generate=>>> whatever text you need to look like whatever you need it to look like=>>> (whether HTML, javascript, XML, or anything.)>>>>>> There are also special XML tags in webdna, like>>> [xmlnodes]>>> and others.. but I have never looked into them.. They may make your>>> job even easier. (in reading or writing xml.. ?)>>> also there is a tag called [tcpconnect] you can use to connect>>> directly to a server. But if you are just posting a form to them>>> though, then you do not need that.>>>>>> dive in and ask more Q's as you encounter them. maybe read something=>>> introductory about XML so you can separate out Webdna Q's from XML>>> Q's.>>>>>> -Govinda>>>>>> On Sep 10, 2009, at 4:49 PM, Mark Bergkvist wrote:>>>>>>> Not sure if anyone can help, but I need to connect to a supplier via=>>>> XML using an HTTP-POST command to get pricing information from.>>>>>>>> I know nothing about XML and not even sure if this is a WebDNA>>>> question.>>>>>>>> Here is the sample document they sent me to work with. They did>>>> also provide me with a URL and username/password to connect with.>>>>>>>> >>>> 2.0>>>> >>>> MD>>>> YOU>>>> MD>>>> MyId>>>> MyPassword>>>> 12345>>>> >>>> >>> GovtEndUserType=3D"F" />>>>> 1>>>> >>>>>>>>>>>> Anyone have any ideas where I should start?>>>>>>>> Windows 2003 IIS server>>>> WebDNA 6.2.0>>>>>>>>>>>> Mark>>>> --------------------------------------------------------->>>> This message is sent to you because you are subscribed to>>>> the mailing list .>>>> To unsubscribe, E-mail to: >>>> archives: http://mail.webdna.us/list/talk@webdna.us>>>> old archives: http://dev.webdna.us/TalkListArchive/>>>> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&cate=gory=3D288>>> ------------>>> Govinda>>> govinda.webdnatalk@gmail.com>>>>>>>>>>>>>>> --------------------------------------------------------->>> This message is sent to you because you are subscribed to>>> the mailing list .>>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us>>> old archives: http://dev.webdna.us/TalkListArchive/>>> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&categ=ory=3D288>>> --------------------------------------------------------->>> This message is sent to you because you are subscribed to>>> the mailing list .>>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us>>> old archives: http://dev.webdna.us/TalkListArchive/>>> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&categ=ory=3D288>> --------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us>> old archives: http://dev.webdna.us/TalkListArchive/>> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&catego=ry=3D288>> --------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us>> old archives: http://dev.webdna.us/TalkListArchive/>> Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&catego=ry=3D288>> .>>>=20> --> -------------------------------------------> Marc Thompson> Software Engineer> Office of Information Technology> University of Utah> 801.585.9264> marc.thompson@utah.edu> ------------------------------------------->=20> N=18=EF=BF=BD=EF=BF=BD=EF=BF=BD,j=07=EF=BF=BD=EF=BF=BD=C7=A7=EF=BF=BD=EF==BF=BD2=EF=BF=BD=EF=BF=BD=EF=BF=BDq=EF=BF=BD=EF=BF=BD{*.j=EF=BF=BD=EF=BF=BD==EF=BF=BD=EF=BF=BD=1C=EF=BF=BD&=EF=BF=BDv=EF=BF=BD-=EF=BF=BD=E9=9A=8AX=EF==BF=BD=EF=BF=BDX=EF=BF=BD=EF=BF=BD=D6=A5=EF=BF=BD=07=EF=BF=BDvv=EF=BF=BD=EF==BF=BD:.=EF=BF=BD=CB=9B=EF=BF=BD=EF=BF=BD=EF=BF=BDm=EF=BF=BD&j)m=EF=BF=BD==D6=A5=EF=BF=BDW=EF=BF=BD=EF=BF=BD=EF=BF=BD=1Em=EF=BF=BD=DA=BA=C6=ABr=18=EF==BF=BDz=EF=BF=BDm=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF==BF=BD=EF=BF=BD=DD=9D=EF=BF=BD=EF=BF=BD=EF=BF=BDX=EF=BF=BD=EF=BF=BD=EF=BF==BDZ=EF=BF=BDL=1Em=EF=BF=BD=DA=BA=EF=BF=BD%u=EF=BF=BD=DC=86+=DE=B2=1Bm=EF==BF=BD=EF=BF=BD=EF=BF=BDz=EF=BF=BD=1Em=EF=BF=BD=DA=BA=EF=BF=BD=EF=BF=BDjY= =EF=BF=BD=EF=BF=BD@=EF=BF=BD=EF=BF=BDb=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD==04^=EF=BF=BD=EF=BF=BD=EF=BF=BDx!=EF=BF=BD=EF=BF=BD=7F=EF=BF=BD=EF=BF=BD+==EF=BF=BDl=1Em=EF=BF=BD=DA=BA=EF=BF=BD=DE=B9=C6=9Bn=1Bf=EF=BF=BD=EF=BF=BD==EF=BF=BDz=EF=BF=BD)=EF=BF=BD=EF=BF=BD=1Cj=D7=A0=EF=BF=BD=EF=BF=BD=EF=BF=BD=--=20-------------------------------------------Marc ThompsonSoftware EngineerOffice of Information TechnologyUniversity of Utah801.585.9264marc.thompson@utah.edu---------------------------------------------------------ms030708030907010708090308Content-Type: application/x-pkcs7-signature; name="smime.p7s"Content-Transfer-Encoding: base64Content-Disposition: attachment; filename="smime.p7s"Content-Description: S/MIME Cryptographic SignatureMIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIIyTCCAr8wggIooAMCAQICEBsJjtdroK6bD6QFOjpu3bIwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UEBhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA5MDIyMzE5MzkyNVoXDTEwMDIyMzE5MzkyNVowgYoxETAPBgNVBAQTCFRob21wc29uMQ0wCwYDVQQqEwRNYXJjMRYwFAYDVQQDEw1NYXJjIFRob21wc29uMScwJQYJKoZIhvcNAQkBFhhtdGhvbXBzb25AbWVkaWEudXRhaC5lZHUxJTAjBgkqhkiG9w0BCQEWFm1hcmMudGhvbXBzb25AdXRhaC5lZHUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM59JRdQxO5rxD9dkmKAk/FobjsVKTA+u4e8lYfiMt3ZRIpBx5JX3h9h7j2JCZDPbB5s/jxg+DoL4oyL8nRZ5WI03nkWsizq4LzvPCudQjos5hflS+7sQ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WwgSXNzdWluZyBDQQIQGwmO12ugrpsPpAU6Om7dsjANBgkqhkiG9w0BAQEFAASBgHtwhcrNMiriAP2D67LhO82bijUsZdrf/h14XGcAs46+YHur+5wjQlwaevt8YM760WtJKEFlL000Gx8iS5Ndhccw9b4THUIMwzeBUF1f0CZur81faIHJOOuXksi0sD7UUGNKMgefFagCsE4dYQhnMDG6iOx8OYLfbxuAAc0/p5/mAAAAAAAA--------------ms030708030907010708090308--
Marc Thompson
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
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...
Related Readings:
[LOOKUP] (1997)
updating with ProductEditor (1998)
problems with 2 tags (1997)
trouble updating records in database (1998)
SKU lookup (1997)
TCPConnect / Current Temperature (2004)
URL too Long? (1997)
forms and variables (1998)
AutoReload? RequireComment? InterpretAll? (1999)
Nesting format tags (1997)
Displaying text and populating form fields (2005)
Smart caching problems with 2.1b3? (1997)
Multiple cart additions (1997)
To Do list (2003)
International Orders (1998)
Problems with [Search] param - Mac Plugin b15 (1997)
Filemaker Pro Template for Orders (1999)
PROBLEM (1997)
Re2: frames & carts (1997)
Database changes (1998)