Re: first stab at generating an XML output
Re: first stab at generating an XML output
- Subject: Re: first stab at generating an XML output
- From: Dov Rosenberg <email@hidden>
- Date: Thu, 18 Aug 2005 07:38:46 -0400
In the appendToResponse() make sure to set the content type to "text/xml"
before returning the response. Otherwise the browsers will try to display
the page as HTML. If you are trying to integrate business processes - you
should look at the WebServices stuff - it is pretty easy with WO
On 8/18/05 3:10 AM, "Geoff Hopson" <email@hidden> wrote:
> The simple solution is to build up a StringBuffer and append
> away...maybe run it through a parser before you return it to validate
> that the XML is at least valid.
>
> The harder solution is to go the full DOM route. At least you get a
> 'purists chubby' if you go that way :-)
>
> I say go with a StringBuffer. Get it working first. If the XML starts
> to get more complex/convoluted, maybe reimplement the method to use
> something else.
>
> Geoff
>
> On 18/08/05, WebObjects <email@hidden> wrote:
>> I've combed PracticalWO and BuildingWO5, and still feel a little
>> directionless. I have a 3rd party whose software needs to query mine, and
>> get the results in .xml format. Sounds pretty simple. The simple part is
>> getting the request in the form of a direct action. My problem/question is
>> "How do I return the resulting data in the form of .xml?"
>>
>> Ideally the resulting document should look like:
>>
>> <?xml version="1.0" encoding="ISO8859-1" ?>
>> <statuscheck>
>> <statuscode>12345</ statuscode>
>> <statusdescription>This account is valid</ statusdescription>
>> </statuscheck>
>>
>> Thanks for any guidance,
>>
>> -Bill
>>
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
m
>>
>> This email sent to email@hidden
>>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> n.com
>
> This email sent to email@hidden
_______________________________________________
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