From: Chris W. <c.j...@gm...> - 2006-04-13 14:24:00
|
It's a character flaw of mine to always look for the harder way of getting things done, to make thing easier in the long run. Anyhow, you've offered up some good points, and have cleared up somethings for me. Writing out WSDL strings is easier, but the companies that offer up these services change their structure from version to version, and I am trying to aniticpate these version changes by writing more flexible packages, so as t= o eliminate extensive code rewrites. I think we are setting forth the same points, just from differing perspectives. I'll play around with the soapval class, maybe hack it a bit to meet my needs, and will let you know what I come up with. Thanks for the info. CJ... On 4/13/06, Scott Nichol <sni...@sc...> wrote: > > Your life as a NuSOAP programmer is easiest if you use WSDL provided by > the service. That provides NuSOAP with most of the information about how= to > construct a SOAP request. You just provide data values in the correct > structure. > > If there is no WSDL, or the WSDL uses a construct not supported by NuSOAP= , > or you need to provide SOAP Header values, the next best option is usuall= y > to use the soapval class. This can be tedious and yields verbose code, b= ut > it can work in virtually all circumstances. > > The "randomly generated namespace" is, more precisely, a namespace > prefix. It can make the XML a little harder for humans to read, but > machines (i.e. XML parsers) have no problems with it. As long as the > prefix refers to the correct namespace, the service to which you send the > XML should be happy. > > Scott Nichol > > Do not send e-mail directly to this e-mail address, > because it is filtered to accept only mail from > specific mail lists. > ----- Original Message ----- > From: "Chris Walsh" <c.j...@gm...> > To: "Scott Nichol" <sni...@sc...> > Cc: <nus...@li...> > Sent: Thursday, April 13, 2006 8:35 AM > Subject: Re: [Nusoap-general] Constructin SOAP request XML > > > I'm not trying to build XML, it's more of a generation of repetitive SOAP > requests, for which I'd like to create a method that will pass typical > parameters into a request structure. I was doing some digging around > through > the nusoap code last night, and found the 'soap_val' object, which is kin= d > of what I'm looking for. The only problem with that object is that it > creates this randomly generated element namespace (something I could do > without or maybe it doesn't really matter). I've used the soap_val object > before for ESRI Map Services, and it seemed to do exactly that, build a > SOAP > request. Still a bit wary about what to use. Any pointers would be of > great > help. > > CJ... > > On 4/12/06, Scott Nichol <sni...@sc...> wrote: > > > > Normally, one does not build the XML in one's own code. That is usuall= y > > done only where the service requires some particular construct that > NuSOAP > > will not correctly generate automatically. It is more typical that cod= e > > will pass NuSOAP arrays of method parameters that NuSOAP will use to > > generate the XML payload. > > > > The samples directory in CVS and the NuSOAP distributions includes > > examples of passing parameters as arrays. There are also a number of > > tutorials on the 'net that show how to do this, including mine starting > at > > http://www.scottnichol.com/nusoapintro.htm. > > > > Scott Nichol > > > > Do not send e-mail directly to this e-mail address, > > because it is filtered to accept only mail from > > specific mail lists. > > ----- Original Message ----- > > From: "C.J." <cj...@od...> > > To: <nus...@li...> > > Sent: Wednesday, April 12, 2006 10:38 AM > > Subject: [Nusoap-general] Constructin SOAP request XML > > > > > > > Hello guys, > > > > > > I'm fairly new to the inner workings of NuSOAP, and got some really > good > > > scripts together in the past few days for a program I'm working on. M= y > > > question regards a SOAP request that needs to be sent to a web servic= e > > in > > > parts (i.e. Request header, footer, and body/actual request). Does > > nusoap > > > have a way of building the XML, or do you have to write out the XML b= y > > hand > > > everytime? > > > > > > Cheers, > > > CJ... > > > > > > -- > > > Christopher J. Walsh... > > > +------------------------------+ > > > + OdeWeb Designs + > > > + http://www.odewebdesigns.com + > > > + cj...@od... + > > > +------------------------------+ > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > language > > > that extends applications into web and mobile media. Attend the live > > webcast > > > and join the prime developer group breaking into this new coding > > territory! > > > > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > > > _______________________________________________ > > > Nusoap-general mailing list > > > Nus...@li... > > > https://lists.sourceforge.net/lists/listinfo/nusoap-general > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > language > > that extends applications into web and mobile media. Attend the live > > webcast > > and join the prime developer group breaking into this new coding > > territory! > > http://sel.as-us.falkag.net/sel?cmdlnk&kid=110944&bid$1720&dat=121642 > > _______________________________________________ > > Nusoap-general mailing list > > Nus...@li... > > https://lists.sourceforge.net/lists/listinfo/nusoap-general > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmdlnk&kid=110944&bid$1720&dat=121642 > _______________________________________________ > Nusoap-general mailing list > Nus...@li... > https://lists.sourceforge.net/lists/listinfo/nusoap-general > |