Re: Webservice Serializing/Deserializing WOStringKeyMap fails
There must be something specific that you're using that I'm not ... My WSDL looks (roughly) the same, except for the definitions of my own complex types, and it works fine. For what it's worth, I don't return anything that is of type Map. In all of my services, I return one: a primitive type (String, int, float, boolean), one of my own custom objects(i.e. WSPerson), an array of primitive types (String[], not NSArray), or an array of my own custom objects (i.e. WSPerson []). This has been working with no problems for me on 5.3 as long as I had the modified Axis client to work around the cookie problem (.net worked with it out-of-the-box). ms On May 11, 2006, at 11:17 PM, Pierre Frisch wrote: Hi Mike, Sorry to disturb you but I dont think it works as mentioned. I have a WO application that makes heavy use of WebServices (http:// www.spearcat.com) and it runs very well under wo 5.2.x however I have never managed to get it running with 5.3.x. The main problem is the WebServices. the way 5.3 with Axis 1.1 generate wsdl and handle WebServices has changed. We have methods that will typically return a WOKeyMapString. This does not work any more. I get an error: 11 May 2006 17:34:55,747 ERROR [WorkerThread 6]: MonitorClient.invoke - invoke() exception com.webobjects.foundation.NSForwardException for javax.xml.rpc.ServiceException: Error processing WSDL document: java.io.IOException: Type {http://schemas.xmlsoap.org/soap/ encoding/}Struct is referenced but not defined. at org.apache.axis.client.Service.initService(Service.java:278) The generated wsdl has changed and probably not for the better. The old one used to be: http://antrax.spearway.com:2440/ sPearCat/sPearCatWatchDog.woa/ws/MonitorRequest" xmlns="http:// schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/ xml-soap" xmlns:impl="http://antrax.spearway.com:2440/sPearCat/ sPearCatWatchDog.woa/ws/MonitorRequest" xmlns:intf="http:// antrax.spearway.com:2440/sPearCat/sPearCatWatchDog.woa/ws/ MonitorRequest" xmlns:soapenc="http://schemas.xmlsoap.org/soap/ encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";> type="soapenc:Struct"/> .. The new one starts: http://localhost:2440/sPearCat/ sPearCatWatchDog.woa/ws/MonitorRequest" xmlns="http:// schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/ xml-soap" xmlns:impl="http://localhost:2440/sPearCat/ sPearCatWatchDog.woa/ws/MonitorRequest" xmlns:intf="http:// localhost:2440/sPearCat/sPearCatWatchDog.woa/ws/MonitorRequest" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";>targetNamespace="http://xml.apache.org/xml-soap"; xmlns="http:// www.w3.org/2001/XMLSchema">name="Map">name="item">type="xsd:anyType"/>all>wsdl:types> I am no wsdl expert but it looks like the headed is confused why does it redefine the Map that is one of the base type. Thank you Pierre On 27-Apr-06, at 3:46 PM, Mike Schrag wrote: 5.3.x and wsdl generation DOES work. This is actually one of the few things that IS on the wikibook :) http://en.wikibooks.org/wiki/Programming:WebObjects/Web_Services/ Web_Service_Provider Let me know if there is still something that isn't clear after this and I'll revise it. ms On Apr 27, 2006, at 6:00 PM, Pierre Frisch wrote: Mike, Are you working with 5.3.x or 5.2.x? Are you using D2WebServices? or do it custom? Does your wsdl generation work? Pierre On 27-Apr-06, at 11:45 AM, Mike Schrag wrote: WO definitely supports non-primitive types with Axis ... We have several custom object types that I register with: public static void registerType(Class _class, QName _qName) { WOWebServiceRegistrar.registerFactoriesForClassWithQName(new BeanSerializerFactory(_class, _qName), new BeanDeserializerFactory(_class, _qName), _class, _qName); } ms On Apr 27, 2006, at 2:38 PM, Trond Kandal wrote: Kristof Cossement wrote: Hey everyone, I try to create a webservice with one input parameter of type WOStringKeyMap. WOStringKeyMap has a serializer and a deserializer class ! However exchanging the hash through webservices is not working in Webobjects! Has anyone experienced this too? Does anyone have a workaround ? no, i do not have a workaround but i think that axis which is used in wo only supports primitive object-types( which is defined in java.lang and arrays of these objects). the problem is that WOStringKeyMap is a object that is only defined in the wo-framework. i think you will have to write a replacement for axis in order to serialize custom objects like WOStringKeyMap. trond. -- Trond Kandal Organisasjonsavd. voice: +47 73597497 Integrasjonsgruppa NTNU
Re: Webservice Serializing/Deserializing WOStringKeyMap fails
Hi Mike, Sorry to disturb you but I dont think it works as mentioned. I have a WO application that makes heavy use of WebServices (http:// www.spearcat.com) and it runs very well under wo 5.2.x however I have never managed to get it running with 5.3.x. The main problem is the WebServices. the way 5.3 with Axis 1.1 generate wsdl and handle WebServices has changed. We have methods that will typically return a WOKeyMapString. This does not work any more. I get an error: 11 May 2006 17:34:55,747 ERROR [WorkerThread 6]: MonitorClient.invoke - invoke() exception com.webobjects.foundation.NSForwardException for javax.xml.rpc.ServiceException: Error processing WSDL document: java.io.IOException: Type {http://schemas.xmlsoap.org/soap/encoding/} Struct is referenced but not defined. at org.apache.axis.client.Service.initService(Service.java:278) The generated wsdl has changed and probably not for the better. The old one used to be: http://antrax.spearway.com:2440/ sPearCat/sPearCatWatchDog.woa/ws/MonitorRequest" xmlns="http:// schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/ xml-soap" xmlns:impl="http://antrax.spearway.com:2440/sPearCat/ sPearCatWatchDog.woa/ws/MonitorRequest" xmlns:intf="http:// antrax.spearway.com:2440/sPearCat/sPearCatWatchDog.woa/ws/ MonitorRequest" xmlns:soapenc="http://schemas.xmlsoap.org/soap/ encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";> type="soapenc:Struct"/> .. The new one starts: http://localhost:2440/sPearCat/ sPearCatWatchDog.woa/ws/MonitorRequest" xmlns="http:// schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/ xml-soap" xmlns:impl="http://localhost:2440/sPearCat/ sPearCatWatchDog.woa/ws/MonitorRequest" xmlns:intf="http://localhost: 2440/sPearCat/sPearCatWatchDog.woa/ws/MonitorRequest" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:wsdlsoap="http:// schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/ XMLSchema">http://xml.apache.org/ xml-soap" xmlns="http://www.w3.org/2001/XMLSchema";>namespace="http://schemas.xmlsoap.org/soap/encoding/"/>name="Map">name="item">>element> I am no wsdl expert but it looks like the headed is confused why does it redefine the Map that is one of the base type. Thank you Pierre On 27-Apr-06, at 3:46 PM, Mike Schrag wrote: 5.3.x and wsdl generation DOES work. This is actually one of the few things that IS on the wikibook :) http://en.wikibooks.org/wiki/Programming:WebObjects/Web_Services/ Web_Service_Provider Let me know if there is still something that isn't clear after this and I'll revise it. ms On Apr 27, 2006, at 6:00 PM, Pierre Frisch wrote: Mike, Are you working with 5.3.x or 5.2.x? Are you using D2WebServices? or do it custom? Does your wsdl generation work? Pierre On 27-Apr-06, at 11:45 AM, Mike Schrag wrote: WO definitely supports non-primitive types with Axis ... We have several custom object types that I register with: public static void registerType(Class _class, QName _qName) { WOWebServiceRegistrar.registerFactoriesForClassWithQName(new BeanSerializerFactory(_class, _qName), new BeanDeserializerFactory (_class, _qName), _class, _qName); } ms On Apr 27, 2006, at 2:38 PM, Trond Kandal wrote: Kristof Cossement wrote: Hey everyone, I try to create a webservice with one input parameter of type WOStringKeyMap. WOStringKeyMap has a serializer and a deserializer class ! However exchanging the hash through webservices is not working in Webobjects! Has anyone experienced this too? Does anyone have a workaround ? no, i do not have a workaround but i think that axis which is used in wo only supports primitive object-types( which is defined in java.lang and arrays of these objects). the problem is that WOStringKeyMap is a object that is only defined in the wo-framework. i think you will have to write a replacement for axis in order to serialize custom objects like WOStringKeyMap. trond. -- Trond Kandal Organisasjonsavd. voice: +47 73597497 Integrasjonsgruppa NTNU mobile:+47 91897110 IT-seksjonen 7491 Trondheimfax: +47 73598200 http://www.itea.ntnu.no/integrasjon This is Unix land. In quiet nights you can hear M$-Windoze machines reboot. ___ WebObjects-dev mailing list [EMAIL PROTECTED] http://www.omnigroup.com/mailman/listinfo/webobjects-dev ___ 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/ pierre.frisch%40spearway.com This email sent to [EMAIL PROTECTED] _
Re: Webservice Serializing/Deserializing WOStringKeyMap fails
5.3.x and wsdl generation DOES work. This is actually one of the few things that IS on the wikibook :) http://en.wikibooks.org/wiki/Programming:WebObjects/Web_Services/ Web_Service_Provider Let me know if there is still something that isn't clear after this and I'll revise it. ms On Apr 27, 2006, at 6:00 PM, Pierre Frisch wrote: Mike, Are you working with 5.3.x or 5.2.x? Are you using D2WebServices? or do it custom? Does your wsdl generation work? Pierre On 27-Apr-06, at 11:45 AM, Mike Schrag wrote: WO definitely supports non-primitive types with Axis ... We have several custom object types that I register with: public static void registerType(Class _class, QName _qName) { WOWebServiceRegistrar.registerFactoriesForClassWithQName(new BeanSerializerFactory(_class, _qName), new BeanDeserializerFactory (_class, _qName), _class, _qName); } ms On Apr 27, 2006, at 2:38 PM, Trond Kandal wrote: Kristof Cossement wrote: Hey everyone, I try to create a webservice with one input parameter of type WOStringKeyMap. WOStringKeyMap has a serializer and a deserializer class ! However exchanging the hash through webservices is not working in Webobjects! Has anyone experienced this too? Does anyone have a workaround ? no, i do not have a workaround but i think that axis which is used in wo only supports primitive object-types( which is defined in java.lang and arrays of these objects). the problem is that WOStringKeyMap is a object that is only defined in the wo-framework. i think you will have to write a replacement for axis in order to serialize custom objects like WOStringKeyMap. trond. -- Trond Kandal Organisasjonsavd. voice: +47 73597497 Integrasjonsgruppa NTNU mobile:+47 91897110 IT-seksjonen 7491 Trondheimfax: +47 73598200 http://www.itea.ntnu.no/integrasjon This is Unix land. In quiet nights you can hear M$-Windoze machines reboot. ___ WebObjects-dev mailing list [EMAIL PROTECTED] http://www.omnigroup.com/mailman/listinfo/webobjects-dev ___ 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/pierre.frisch %40spearway.com This email sent to [EMAIL PROTECTED] ___ 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 archive@mail-archive.com
Re: Webservice Serializing/Deserializing WOStringKeyMap fails
Mike, Are you working with 5.3.x or 5.2.x? Are you using D2WebServices? or do it custom? Does your wsdl generation work? Pierre On 27-Apr-06, at 11:45 AM, Mike Schrag wrote: WO definitely supports non-primitive types with Axis ... We have several custom object types that I register with: public static void registerType(Class _class, QName _qName) { WOWebServiceRegistrar.registerFactoriesForClassWithQName(new BeanSerializerFactory(_class, _qName), new BeanDeserializerFactory (_class, _qName), _class, _qName); } ms On Apr 27, 2006, at 2:38 PM, Trond Kandal wrote: Kristof Cossement wrote: Hey everyone, I try to create a webservice with one input parameter of type WOStringKeyMap. WOStringKeyMap has a serializer and a deserializer class ! However exchanging the hash through webservices is not working in Webobjects! Has anyone experienced this too? Does anyone have a workaround ? no, i do not have a workaround but i think that axis which is used in wo only supports primitive object-types( which is defined in java.lang and arrays of these objects). the problem is that WOStringKeyMap is a object that is only defined in the wo-framework. i think you will have to write a replacement for axis in order to serialize custom objects like WOStringKeyMap. trond. -- Trond Kandal Organisasjonsavd. voice: +47 73597497 Integrasjonsgruppa NTNU mobile:+47 91897110 IT-seksjonen 7491 Trondheimfax: +47 73598200 http://www.itea.ntnu.no/integrasjon This is Unix land. In quiet nights you can hear M$-Windoze machines reboot. ___ WebObjects-dev mailing list [EMAIL PROTECTED] http://www.omnigroup.com/mailman/listinfo/webobjects-dev ___ 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/pierre.frisch% 40spearway.com This email sent to [EMAIL PROTECTED] ___ 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 archive@mail-archive.com
Re: Webservice Serializing/Deserializing WOStringKeyMap fails
WO definitely supports non-primitive types with Axis ... We have several custom object types that I register with: public static void registerType(Class _class, QName _qName) { WOWebServiceRegistrar.registerFactoriesForClassWithQName(new BeanSerializerFactory(_class, _qName), new BeanDeserializerFactory (_class, _qName), _class, _qName); } ms On Apr 27, 2006, at 2:38 PM, Trond Kandal wrote: Kristof Cossement wrote: Hey everyone, I try to create a webservice with one input parameter of type WOStringKeyMap. WOStringKeyMap has a serializer and a deserializer class ! However exchanging the hash through webservices is not working in Webobjects! Has anyone experienced this too? Does anyone have a workaround ? no, i do not have a workaround but i think that axis which is used in wo only supports primitive object-types( which is defined in java.lang and arrays of these objects). the problem is that WOStringKeyMap is a object that is only defined in the wo-framework. i think you will have to write a replacement for axis in order to serialize custom objects like WOStringKeyMap. trond. -- Trond Kandal Organisasjonsavd. voice: +47 73597497 Integrasjonsgruppa NTNU mobile:+47 91897110 IT-seksjonen 7491 Trondheimfax: +47 73598200 http://www.itea.ntnu.no/integrasjon This is Unix land. In quiet nights you can hear M$-Windoze machines reboot. ___ WebObjects-dev mailing list [EMAIL PROTECTED] http://www.omnigroup.com/mailman/listinfo/webobjects-dev ___ 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 archive@mail-archive.com