Re: WSDL via Direct Action?
Re: WSDL via Direct Action?
- Subject: Re: WSDL via Direct Action?
- From: Francis Labrie <email@hidden>
- Date: Tue, 19 Jun 2007 22:13:57 -0400
Hi,
email@hidden wrote:
I'm having trouble with the types schema of my WSDL. In the WIKI
for WebServices Francis Labrie recommends sharing the WSDL through
Direct Action. Can somebody explain how to do this please? Is
anyone aware of another work-around?
First, this suggestion apply in case the WSDL generated by WebObjects
is incomplete or incorrect.
You can make a fixed/enhanced and static version of you WSDL an you
can put it in your WebObjects application or framework resources.
Then add a direct action method to a WODirectAction subclass in your
project:
public class DirectAction extends WODirectAction {
...
public WOActionResults wsdlAction() {
NSData wsdl;
WOResponse response;
wsdl = new NSData(WOApplication.application().resourceManager
().pathURLForResourceNamed("MyNewWSDL.wsdl", null, null));
response = new WOResponse();
response.setContentEncoding("UTF8");
response.setHeader("UTF-8", "Content-Encoding");
response.setContent(wsdl);
response.setHeader("application/wsdl+xml", "Content-Type");
return response;
}
...
}
(Warning: this code have been written out of memory)
You can even write your WSDL in the HTML resource of a WebObjects
component and return this component in a direct action as your WSDL
(but maybe you'll need to change the returned MIME type then).
Kind regards,
--
Francis Labrie, System Architect, OS communications informatiques -
Your communication engine
email@hidden | Phone: (450) 676-1238 ext. 27 | Fax: (450) 676-5276
_______________________________________________
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