|
Thx a lot. So the ElementSerializer (build in ;-) ) serialises the soap data to an element right? That should solve the problem. Still one question. How do you register the ElementSerializer. I recognized you are using WSIF for executing the webservices. In your code examples i didnt find the registration for the elementserializer. The only thing which looks like registration for a type mapping is the mapType() method. For example for thegoogle search webservice this would look something like this: service.mapType(new QName("urn:GoogleSearch", "GoogleSearchResult"), org.w3c.dom.Element.class); //with GoogleSearchResult as complex type But axis/jax rpc still uses the BeanSerializer which does not work of course. Could you give me another hint for my long and painfull way to success dominik [email protected] sc!
hrieb am 17.10.05 17:08:11:
Ahem... every six months someone asks this ;)
The easiest way is to get the type from the WSDL and register the ElementSerializer / ElementDeserializer to it. This isn't very hard to do, we have to jump through slightly nastier hoops for my project (because we want to handle cases where there's already a mapping and it's a little painful) but the above works, you end up with a DOM Node corresponding to the SOAP body of the message as a return and the call consumes a Node containing the request body.
This is used (mostly) with success in our workflow project, means users can drag WSDL in and get each operation with at least a vague attempt to be sensible around complex types (we don't control the services)
Code is here http://cvs.sourcef!
orge.net/viewcvs.py/taverna/taverna1.0/src/org/embl/ebi/escience/scufl
workers/wsdl/WSDLInvocationTask.java?rev=1.21&view=markup (runs the task) and http://cvs.sourceforge.net/viewcvs.py/taverna/taverna1.0/src/org/embl/ebi/escience/scuflworkers/wsdl/WSDLBasedProcessor.java?rev=1.36&view=markup (sets up the mappings) - apologies for the complexity, those hoops I mentioned earlier? They're on fire, and probably covered in acid dripping razor blades; you can probably get away with something a bit simpler.
Tom
SOA Work wrote: > > > Hi, > > im going to use axis for consuming webservices. i would like to invoke > services completly dynamic. at the moment i cant find a simple way to do > this. > > my problem: i want to use any wsdl and make dynamic calls while runtime. > but: i cant find a easy way to use webservices with complex types. i > only know the beanserializer/beandeserializer for using complex types > and this means !
i must create javacode and compile it. > > im not happy with this situation cause every client maschine must have > jsdk and compile code! isnt there an easier way? > > im not sure about the axis sysem architecture but wouldnt it be possible > to write a serializer/deserializer which output is not a filled bean > but some sort of data in a map for example. with the data contained in a > map (or an dom tree maybe) i could simple access it while runtime. > > anyone an ! idea? maybe someone wrote a solution for this problem? if > there's a way to solve this problem without serializer it would be > alright for me ;-) > > thx in advance > > dominik > > > > Verschicken Sie romantische, coole und witzige Bilder per SMS! > Jetzt bei WEB.DE FreeMail: *http://f.web.de/?mc=021193* >
|
|