• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Webservice Serializing/Deserializing WOStringKeyMap fails
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Webservice Serializing/Deserializing WOStringKeyMap fails


  • Subject: Re: Webservice Serializing/Deserializing WOStringKeyMap fails
  • From: Pierre Frisch <email@hidden>
  • Date: Thu, 11 May 2006 20:17:32 -0700

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:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="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";><wsdl:types/>
<wsdl:message name="instancesRefuseSessionsResponse">
<wsdl:part name="instancesRefuseSessionsReturn" type="soapenc:Struct"/>
</wsdl:message>
......


The new one starts:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="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"><wsdl:types><schema targetNamespace="http://xml.apache.org/ xml-soap" xmlns="http://www.w3.org/2001/XMLSchema";><import namespace="http://schemas.xmlsoap.org/soap/encoding/"/><complexType name="Map"><sequence><element maxOccurs="unbounded" minOccurs="0" name="item"><complexType><all><element name="key" type="xsd:anyType"/ ><element name="value" type="xsd:anyType"/></all></complexType></ element></sequence></complexType></schema></wsdl:types>
<wsdl:message name="instancesStartResponse">
<wsdl:part name="instancesStartReturn" type="soapenc:Struct"/>
</wsdl:message>
....



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 Trondheim fax: +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@hidden
http://www.omnigroup.com/mailman/listinfo/webobjects-dev

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


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:
40spearway.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
  • Follow-Ups:
    • Re: Webservice Serializing/Deserializing WOStringKeyMap fails
      • From: Mike Schrag <email@hidden>
  • Prev by Date: Re: Do batch faults "cascade" ?
  • Next by Date: Re: Displaying user agent in a Component
  • Previous by thread: Re: Do batch faults "cascade" ?
  • Next by thread: Re: Webservice Serializing/Deserializing WOStringKeyMap fails
  • Index(es):
    • Date
    • Thread