Hi,

[EMAIL PROTECTED] 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 PROTECTED] | 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      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to