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 » Overridding Response Status codes for customized SOAP FAULT

Post new topic  Reply to topic
 Overridding Response Status codes for customized SOAP FAULT « View previous topic :: View next topic » 
Author Message
Vakku
PostPosted: Tue Nov 18, 2008 9:08 pm    Post subject: Overridding Response Status codes for customized SOAP FAULT Reply with quote

Novice

Joined: 13 Oct 2008
Posts: 20
Location: California

Hi,

I'm using SOAP nodes in my messageflow to host a webservice. I'm customizing the SOAP fault block using a compute node and sending the FAULT response back to cleint application(Its again a Message Flow) using the SOAP reply node.

But the ResponseStatusCode is set as "200 OK" for the FAULT message and hence it is erroring out at the Cleint Message flow."A SOAP Request node received a SOAP Fault response message, but the HTTP Status code was Success (2xx). The HTTP Request was made to the destination ''http://localhost:7800/ReturnDC''. The HTTP Status-Line returned was: ''HTTP/1.1 200 OK''. "

I tired resetting the response code using "SET OutputRoot.HTTPResponseHeader."ReplyStatusCode" ='500';" and all. But it is all failing.

Can anyone please suggest the syntax to override the Response Code and send it as "500" or any similar HTTP fault codes?

Regards,
Vakku.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Nov 18, 2008 9:30 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

mgk wrote:
Hi,

No problem, it is not the easiest thing to find. The location is:

Code:
LocalEnvrionment.Destination.HTTP.ReplyStatus



and it is documented in the infocentre under topic ac20450

Regards,


See http://www.mqseries.net/phpBB2/viewtopic.php?t=45950
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Vakku
PostPosted: Thu Nov 20, 2008 1:12 am    Post subject: Reply with quote

Novice

Joined: 13 Oct 2008
Posts: 20
Location: California

Thanks for the response. I've seen this thread before also. But this is not working in my case. Can anyone please confirm whether HTTP Responseheaaders differ from SOAPResponseHeaders, or anyway with the usage of SOAP nodes?

I'll explain my scenario in detail. In the messageFlow, whenever an exception occurs it is coming to the catch terminal of SOAPINput node and I'm using this ExceptionTree structure to construct the FAULT.

SOAP Input(Catch Terminal)-->Compute Node(Constructing the FAULT)-->SOAPReply node.

The tried with many other options in Compute Node like, though many of them were trial and error methodology like
Set OutputRoot.HTTPResponseHeader."X-Original-HTTP-Status-Line" ='HTTP/1.1 500 Internal Server Error.';
Set OutputRoot.HTTPResponseHeader."X-Original-HTTP-Status-Code" =500;
SET OutputRoot.XMLNSC.SOAP_Domain_Msg.Context.operationType='UNKNOWN';
SET OutputRoot.SOAP.Reply.Transport.HTTP.ReplyStatusCode=500;
.

broker trace is giving the error "RecoverableException BIP3710E: A SOAP Request node received a SOAP Fault response message, but the HTTP Status code was Success (2xx). The HTTP Request was made to the destination ''http://localhost:7800/ReturnDC''. The HTTP Status-Line returned was: ''HTTP/1.1 200 OK''. It is an error for a remote web server to return a SOAP Fault message with an HTTP Status Code of Success (2xx). Determine why the remote web server is returning a SOAP Fault under an HTTP Success Status Code ".
Hoping your support in solving this.

Regards,
Vakku.
Back to top
View user's profile Send private message
mgk
PostPosted: Thu Nov 20, 2008 1:59 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Hi.

Yes the location is different for the SOAP Nodes. Use the following in your Compute node before the SOAPReply node (and make sure the ComputeMode is set to LocalEnvironmentAndMessage or All):

Code:
SET OutputLocalEnvironment.Destination.SOAP.Reply.Transport.HTTP.ReplyStatusCode = 500;


where 500 is the code you want to use.
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
Vakku
PostPosted: Thu Nov 20, 2008 3:55 am    Post subject: Reply with quote

Novice

Joined: 13 Oct 2008
Posts: 20
Location: California

It worked perfectly fine with this line of code. Thanks a lot for the help MGK.

Can you please post the useful links regarding these SOAP nodes, if you have any? When I searched, I couldn't get much info regarding these nodes or SOAP Tree structure. So please share the links for these information. Once again ,Thanks a lot for help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Overridding Response Status codes for customized SOAP FAULT
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.