And the quest continues...
I had based my implementation of all internal stuff of Ensemble
at previous Web Service/WSDL the third-party company gave me. (If you wanna know what stuff I mean, it's BPEL e Ensemble's "Business Operations".)
With the previous WSDL, the Caché's WS Client wizard generated all the structures as classes, i.e., if I had to send an structure "Person", I would have a generated class "Person", with its properties "Name", "Age", etc..., and the method's parameter would be an instance of this class. However, with the new WSDL, the wizard (I dont know why) generated the methods with each property of the structure as a separated parameter. If before it was:updatePerson(p as Person)
Now it generated:updatePerson(name as %String, age as %Integer, ...)
And OF COURSE it broke down all my previous work. For me not to have to refactor all other classes, I thought it would be better to change manually the classes generated by the wizard, adapting them for the classes I had.
So, I continued my quest, changing the Web Client class generated:(before)
(after)
Well, as naive as someone can be, I thought just this would work. I compiled and tested... and didnt work. To not extend the description of my struggle, I found out that with my changes, it was not writing correctly the Body of the SOAP Envelope, as the Web Service expected, with the namespaces correctly declared.
Looking for some solution, I saw the property "WriteSOAPBodyMethod" from the class %SOAP.WebBase, which is superclass of %SOAP.WebClient. This property allows us to define a method to write a custom Body for a SOAP message.
Using it, we have:(writing custom SOAP-Body - advice: do it as last solution)
With this little "trick", I finally got all my other code intact and working, and it really called the Web Service correctly. But... there was a catch, always a catch...
The quest was not over yet...
To be continued.
quinta-feira, 6 de setembro de 2007
Web Services with Caché/Ensemble - The Quest - chpt 2
Assinar:
Postar comentários (Atom)
1 comentários:
It really is a real quіte ɑ job gake οf strategy,
creative imagination, humor, аnd also kindd of gߋod luck, and caո take paгt in bby simply practtically
anyy age. Ϝoг this reason, you could put away any document Ourite гegarding liҝe complicated ոumbers.
A lot of us most lіkely kеep in mind an erɑ or evsn 2 whеnеѵer աe
anticipated wе coսld sneak tɦe glimpse in а thesaurus ʝust
to manage tο location aոotɦer thinɡ abοut the table.
Herе is my homepage scrabble download free full version
Postar um comentário