Author |
Message
|
reshds |
Posted: Fri Oct 07, 2011 9:35 am Post subject: Generating Soap fault message issue |
|
|
 Apprentice
Joined: 25 Mar 2010 Posts: 37 Location: LA
|
Hi
Please help me how to generate the soap fault message.when I tried putting few of th e examples found in the forum ,I am getting error as soap fault. I need to send a customised soap fault message as response .
Thanks in advance
Webpshere broker 6.0 _________________ Thanks. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Oct 07, 2011 9:41 am Post subject: Re: Generating Soap fault message issue |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
reshds wrote: |
I am getting error as soap fault. |
What error? Parser error? Pilot error? Human error? Cheese out of range error?
reshds wrote: |
Webpshere broker 6.0 |
Considered updating at all? That's old. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
reshds |
Posted: Fri Oct 07, 2011 9:45 am Post subject: |
|
|
 Apprentice
Joined: 25 Mar 2010 Posts: 37 Location: LA
|
Iam not allowed to update the broker this time.
why the below is not deploying in the server.
I think parentheses .(XML.NamespaceDecl) is the problem
SET OutputRoot.XMLNS.Env:Envelope.(XML.NamespaceDecl)xmlns:SOAPENV = 'http://schemas.xmlsoap.org/soap/envelope/';
can you tell me any alternate way _________________ Thanks. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Oct 07, 2011 9:51 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
reshds wrote: |
I think parentheses .(XML.NamespaceDecl) is the problem |
I think you're right.
reshds wrote: |
can you tell me any alternate way |
You could code the ESQL correctly. That's not how you use that construct (which does have parentheses when you use it) and not how you define a namespace in ESQL. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
reshds |
Posted: Fri Oct 07, 2011 10:22 am Post subject: |
|
|
 Apprentice
Joined: 25 Mar 2010 Posts: 37 Location: LA
|
Can you please tell me how to use namespace correctly in SQL?? _________________ Thanks. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Oct 07, 2011 10:25 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
reshds wrote: |
Can you please tell me how to use namespace correctly in SQL?? |
As described in the InfoCenter. I don't recall the exact syntax in v6.0 (and can't be asked to Google for it), but the key points are:
- the construct you've latched onto is for defining the namespace in the document not the broker
- you declare the namespace to the broker then use it in the ESQL. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
reshds |
Posted: Fri Oct 07, 2011 10:44 am Post subject: |
|
|
 Apprentice
Joined: 25 Mar 2010 Posts: 37 Location: LA
|
I searched in the infocenter and dont see any clear solutuion
my question is
Is it possible to construct a customised soap fault message in 6.0 where I can find some sample code?
Thanks for your help _________________ Thanks. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Oct 07, 2011 10:46 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
reshds wrote: |
I searched in the infocenter and dont see any clear solutuion
my question is
Is it possible to construct a customised soap fault message in 6.0 where I can find some sample code?
Thanks for your help |
You can find code samples in the WM663 class:
Quote: |
Students explore how to construct message flows that use ESQL, Java, and XSL transform (XSLT), and how to use databases and maps in message flows. They also learn how to implement application connectivity by using WebSphere Message Broker to create message flows that use Web services, Java messaging services (JMS), and WebSphere MQ message transport mechanisms. |
_________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
Vitor |
Posted: Fri Oct 07, 2011 10:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
reshds wrote: |
I searched in the infocenter and dont see any clear solutuion |
I doubt there's a section titled "Building Customised SOAP Fault Messages" but there's ample information on the use of namespaces (of which SOAP is just an industry standard one)
reshds wrote: |
Is it possible to construct a customised soap fault message in 6.0 |
Yes
reshds wrote: |
where I can find some sample code? |
The help section of the v6.0 Toolkit or the Internet. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
reshds |
Posted: Fri Oct 07, 2011 10:54 am Post subject: |
|
|
 Apprentice
Joined: 25 Mar 2010 Posts: 37 Location: LA
|
I appreciate to your suggestion and I will attend when I get a chance. But this point of time it is critical for me to fix the issues which we are facing.
I tried some sample code availble in teh forum buit its not deploying in 6.0.
DECLARE soapenv NAMESPACE 'http://www.w3.org/2003/05/soap-envelope';
DECLARE xml NAMESPACE 'http://www.w3.org/XML/1998/namespace';
DECLARE my NAMESPACE 'http://mgk';
SET OutputRoot.SOAP.Context.Namespace.(SOAP.NamespaceDecl)xmlns:soapenv = soapenv;
SET OutputRoot.SOAP.Context.Namespace.(SOAP.NamespaceDecl)xmlns:my = my;
SET OutputRoot.SOAP.Body.soapenv:Fault.soapenv:Code.soapenv:Value = 'soapenv:Receiver';
SET OutputRoot.SOAP.Body.soapenv:Fault.soapenv:Code.soapenv:Subcode.soapenv:Value = 'my:subcode value';
SET OutputRoot.SOAP.Body.soapenv:Fault.soapenv:Reason.soapenv:Text = 'my Reason string';
SET OutputRoot.SOAP.Body.soapenv:Fault.soapenv:Reason.soapenv:Text.(SOAP.Attribute)xml:lang = 'en';
SET OutputRoot.SOAP.Body.soapenv:Fault.soapenv:Node = 'my Node string';
SET OutputRoot.SOAP.Body.soapenv:Fault.soapenv:Role = 'my Role string';
SET OutputRoot.SOAP.Body.soapenv:Fault.soapenv:Detail.my:Text = 'my detail string'; _________________ Thanks. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Oct 07, 2011 10:55 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
lancelotlinc wrote: |
You can find code samples in the WM663 class: |
Which samples may use facilities or features which may not be available (or offered the same way) in the v6.0 version the OP is using. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Oct 07, 2011 10:58 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
reshds wrote: |
it is critical for me to fix the issues which we are facing. |
And if your site was up to date with versions you'd have a lot more help available rather than just relying on us.
reshds wrote: |
I tried some sample code availble in teh forum buit its not deploying in 6.0. |
I'm not all that surprised. Do you want to confirm my suspicions by telling us what the deploy error is or will it be more fun if we continue to guess & you tell us when we get it?
reshds wrote: |
DECLARE my NAMESPACE 'http://mgk'; |
If you have mgk on your site, you don't need us.....  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Gaya3 |
Posted: Fri Oct 07, 2011 11:17 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
one suggestion...before trying it in MB, try it using SOAPUI and see what you are getting.
lets start from there and then get in to MB _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
Vitor |
Posted: Fri Oct 07, 2011 11:18 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Gaya3 wrote: |
one suggestion...before trying it in MB, try it using SOAPUI and see what you are getting. |
I'm assuming the OP is trying to build a fault to return, rather than getting one from an external service. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
reshds |
Posted: Fri Oct 07, 2011 12:27 pm Post subject: |
|
|
 Apprentice
Joined: 25 Mar 2010 Posts: 37 Location: LA
|
Vitor. you are right.
Gaya,I want to sent a customized soap fault message when a timeout or databse exception occurs
Quote: |
DECLARE soapenv NAMESPACE 'http://www.w3.org/2003/05/soap-envelope';
DECLARE xml NAMESPACE 'http://www.w3.org/XML/1998/namespace';
DECLARE my NAMESPACE 'http://mgk';
SET OutputRoot.SOAP.Context.Namespace.(SOAP.NamespaceDecl)xmlns:soapenv = soapenv;
SET OutputRoot.SOAP.Context.Namespace.(SOAP.NamespaceDecl)xmlns:my = my;
SET OutputRoot.SOAP.Body.soapenv:Fault.soapenv:Code.soapenv:Value = 'soapenv:Receiver';
SET OutputRoot.SOAP.Body.soapenv:Fault.soapenv:Code.soapenv:Subcode.soapenv:Value = 'my:subcode value';
SET OutputRoot.SOAP.Body.soapenv:Fault.soapenv:Reason.soapenv:Text = 'my Reason string';
SET OutputRoot.SOAP.Body.soapenv:Fault.soapenv:Reason.soapenv:Text.(SOAP.Attribute)xml:lang = 'en';
SET OutputRoot.SOAP.Body.soapenv:Fault.soapenv:Node = 'my Node string';
|
this code is not even deploying, _________________ Thanks. |
|
Back to top |
|
 |
|