Re: Wanting to return an .XML document for a direct action
Re: Wanting to return an .XML document for a direct action
- Subject: Re: Wanting to return an .XML document for a direct action
- From: Blue Moon <email@hidden>
- Date: Mon, 3 Oct 2005 11:42:13 +0200
You create a normal WOComponent, say MyComponent, but instead of putting HTML in the MyComponent.html you put XML in it. Return this component as result of the DirectAction call. That's all.
E.g. MyComponent.html file content: <?xml version="1.0" encoding="windows-1252"?> <result> <approvalcode><webobject name=approvalcode></webobject></approvalcode> <approvalmsg><webobject name=approvalmsg></webobject></approvalmsg> </result>
MyComponent.wod file content: approvalcode: WOString { value = nameOfMyApprovalCodeMethod; } approvalmsg: WOString { value = nameOfMyApprovalMessageMethod; }
Hope this helps.
Rudi Angela
On Oct 2, 2005, at 10:21 PM, WebObjects wrote: Trying to establish the best solution to work with the following scenario: I have a vendor whose application needs to query our db. We have established http as a transport standard, and I have open rights to design whatever WO.app I want on the backend. Ideally the 3rd party wants to submit a URL to our application, for example something like http://mydomain.com/cgi-bin/WebObjects/myapp.woa/wa/myaction?uid=joe?pwd=1234 and in return I’m to send back an XML document with elements like ‘approvalcode=1’, ‘approvalmsg=here is some text’. What is the easiest way to return an XML doc? Naturally I’ve poked around with the ‘Calculator’ example of WebServices; but this may mandate that they design their application to be a ‘consumer’ when all they may really want to do is parse a resulting XML document w/out a lot of fuss. Thanks for any guidance, -Bill Reynolds |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden