Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Catching soapexception properties

291 views
Skip to first unread message

kiskoul

unread,
Apr 26, 2011, 11:56:38 AM4/26/11
to
Hi

I'm using PB 11.5.1 (Build 4897). My application is getting data from
a webservice using soap connection and it works pretty well except for
Exceptions handling.
Indeed, when the request is not right, this webservice throws
exceptions.
Just like a normal result, these exceptions have a known XML format,
with properties I have to read.

But the way exceptions are currently handled in my program does not
allow me to get these properties.
I did it like in all the code examples I found, a soapexception is
catched (object created while importing pbwsclient115.pbx in PB),
something like this :

TRY
ls_result = iuo_webservice.search(ls_arguments)
CATCH (soapexception sexc)
Messagebox('Exception', sexc.getmessage()
END TRY

When an exception is throwed, the soapexception message just says
"Response is not well formed XML".
I debugged the XML response with fiddler2, and it seems fine, I can
see the different XML exceptions properties I expect.
I can't figure out how to get them in Powerbuilder as the
soapexception structure does not have the expected variables.

Moreover, when I edit the wsdl file coming with the webservice, I can
see a searchserviceexception structure, but it was not created when I
deployed the wsdl file in Powerbuilder...

How should I proceed to catch the exception throwed by the
webservice ? Should I check something ?

Thanx.

Regards,

Kiskoul

mjanda

unread,
Apr 28, 2011, 1:17:37 PM4/28/11
to
I am having the exact same problem.

I've written a webservice call that is catching a soapexception, but it doesn't contain all the detail I need. The xml response does contain all the fault detail I want, I just can't figure out how to access it. The wsdl defines a fault, but PowerBuilder does not generate a proxy for it. I tried creating a custom exception object by inheriting from soapexception and adding the elements defined in the fault as instance variables. Then I changed my code to catch that exception, but it bypasses it in favor of the original soapexception. I don't know why it doesn't recognize my object as a soapexception.

If anyone has successfully created and mapped a custom exception to a SOAP fault, I would love to hear from you.

Thanks,Mary

kiskoul

unread,
Apr 29, 2011, 4:05:26 AM4/29/11
to

Hi Mary

I saw a few days ago your thread describing the exact same problem. I
posted on it but my message never showed up...
I'm really starting to believe that Powerbuilder can't do what we
expect, which is quite problematic.

And in my case, I'm facing an additional problem, the third party that
owns the webservice has decided to compress the HTTP responses when
exceptions are thrown. It seems Powerbuilder isn't able to decompress
them, explaining the message "Response is not well formed XML" I get.
With Fiddler2 (HTTP sniffer), I can intercept the compressed
exception, decompress it, and when my application catches it, I'm
getting the contents of the <faultstring> tag (but only that, just as
you).
So if someone know how to enable HTTP decompression on Powerbuilder,
it would also be great.

Thanks,

Kiskoul

bruce.a...@yahoo.com

unread,
May 5, 2011, 10:00:42 PM5/5/11
to
This group is no longer active on the Sybase server. In addition, the feed between Google and the Sybase server is not currently working. If you post
through Goolge the post will never show up on the Sybase server, and most
people who answer questions in that group will never see it.
Instead, you may want to access the Sybase newsgroups directly at:

http://www.sybase.com/detail_list?id=11507&pageNum=1&multi=true&show=1248

0 new messages