ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Generating Soap fault message issue

Post new topic  Reply to topic Goto page 1, 2  Next
 Generating Soap fault message issue « View previous topic :: View next topic » 
Author Message
reshds
PostPosted: Fri Oct 07, 2011 9:35 am    Post subject: Generating Soap fault message issue Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Oct 07, 2011 9:41 am    Post subject: Re: Generating Soap fault message issue Reply with quote

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
View user's profile Send private message
reshds
PostPosted: Fri Oct 07, 2011 9:45 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Oct 07, 2011 9:51 am    Post subject: Reply with quote

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
View user's profile Send private message
reshds
PostPosted: Fri Oct 07, 2011 10:22 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Oct 07, 2011 10:25 am    Post subject: Reply with quote

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
View user's profile Send private message
reshds
PostPosted: Fri Oct 07, 2011 10:44 am    Post subject: Reply with quote

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
View user's profile Send private message
lancelotlinc
PostPosted: Fri Oct 07, 2011 10:46 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Vitor
PostPosted: Fri Oct 07, 2011 10:53 am    Post subject: Reply with quote

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
View user's profile Send private message
reshds
PostPosted: Fri Oct 07, 2011 10:54 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Oct 07, 2011 10:55 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Oct 07, 2011 10:58 am    Post subject: Reply with quote

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
View user's profile Send private message
Gaya3
PostPosted: Fri Oct 07, 2011 11:17 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Oct 07, 2011 11:18 am    Post subject: Reply with quote

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
View user's profile Send private message
reshds
PostPosted: Fri Oct 07, 2011 12:27 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Generating Soap fault message issue
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.