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 » Problem with Web services in MB 6.0

Post new topic  Reply to topic
 Problem with Web services in MB 6.0 « View previous topic :: View next topic » 
Author Message
kash3338
PostPosted: Thu Dec 03, 2009 6:46 pm    Post subject: Problem with Web services in MB 6.0 Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

Hi,

I have implemented a Sample web service using MB 6.0 in windows. I have used HTTP nodes to do the same. I have two flows, one acts as a server and the other a client flow. The flows are designed like,

Server Flow: HTTPInput --> Compute --> HTTPOutput
Client Flow: MQInput --> HTTPRequest --> MQOutput

I have set the message domain as XMLNSC in all flows. I just give a sample xml message as input.
<Root> <A>Value</A></Root>

I get the following error in user trace.

(
(0x01000000):RecoverableException = (
(0x03000000):File = 'F:\build\S000_P\src\DataFlowEngine\ImbDataFlowNode.cpp'
(0x03000000):Line = 616
(0x03000000):Function = 'ImbDataFlowNode::createExceptionList'
(0x03000000):Type = 'ComIbmMQOutputNode'
(0x03000000):Name = 'ClientFlow#FCMComposite_1_2'
(0x03000000):Label = 'ClientFlow.MQOutput'
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Severity = 3
(0x03000000):Number = 2230
(0x03000000):Text = 'Node throwing exception'
(0x01000000):MessageException = (
(0x03000000):File = 'F:\build\S000_P\src\DataFlowEngine\ImbMqOutputNode.cpp'
(0x03000000):Line = 635
(0x03000000):Function = 'ImbMqOutputNode::evaluate'
(0x03000000):Type = 'ComIbmMQOutputNode'
(0x03000000):Name = 'ClientFlow#FCMComposite_1_2'
(0x03000000):Label = 'ClientFlow.MQOutput'
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Severity = 3
(0x03000000):Number = 2660
(0x03000000):Text = 'Message contains no data'
(0x01000000):Insert = (
(0x03000000):Type = 2
(0x03000000):Text = '-1'
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = 'MQW001'
)
(0x01000000):Insert = (
(0x03000000):Type = 2
(0x03000000):Text = '0'
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = ''
)
)
)

This error comes at the failure terminal of the MQOutput node. The xml message actually comes back to the client flow, but it does not put in the queue.

What could be the cause of this erro? I have tried setting/removing the MQMD headers in the response xml. Still face this issue.
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Thu Dec 03, 2009 7:19 pm    Post subject: Re: Problem with Web services in MB 6.0 Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kash3338 wrote:
I have set the message domain as XMLNSC in all flows. I just give a sample xml message as input.


But how is the http request assembled in the compute node?

kash3338 wrote:
This error comes at the failure terminal of the MQOutput node. The xml message actually comes back to the client flow, but it does not put in the queue.


Which is what you'd expect to happen.

kash3338 wrote:
What could be the cause of this erro? I have tried setting/removing the MQMD headers in the response xml. Still face this issue.


A badly formed http request with no data seems to be the most likely cause.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kash3338
PostPosted: Thu Dec 03, 2009 7:29 pm    Post subject: Re: Problem with Web services in MB 6.0 Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

[quote="Vitor"]
kash3338 wrote:
I have set the message domain as XMLNSC in all flows. I just give a sample xml message as input.


But how is the http request assembled in the compute node?

kash3338 wrote:
This error comes at the failure terminal of the MQOutput node. The xml message actually comes back to the client flow, but it does not put in the queue.


Which is what you'd expect to happen.

Actually, once i get the input from the In queue, i directly send it to the server flow through HTTPRequest node. There in server, i dont handle this input message and i create a new output xml messge with hard coded values.
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Thu Dec 03, 2009 7:33 pm    Post subject: Re: Problem with Web services in MB 6.0 Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kash3338 wrote:
Actually, once i get the input from the In queue, i directly send it to the server flow through HTTPRequest node. There in server, i dont handle this input message and i create a new output xml messge with hard coded values.


This does seem to make the input rather pointless. I'll assume this is some kind of proof of concept, but if it ignores the input message I question what it's proving....

Anyway, if this is the case then it's a badly formed response with no data that's mostly likely your problem. As is so often the case, a user trace and a few well placed trace nodes will tell the tale.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kash3338
PostPosted: Thu Dec 03, 2009 7:48 pm    Post subject: Re: Problem with Web services in MB 6.0 Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

Vitor wrote:

This does seem to make the input rather pointless. I'll assume this is some kind of proof of concept, but if it ignores the input message I question what it's proving....

Anyway, if this is the case then it's a badly formed response with no data that's mostly likely your problem. As is so often the case, a user trace and a few well placed trace nodes will tell the tale.


Actually it is just a PoC. We had to try out a sample scenario for web service using Http nodes. As you have mentioned, we have had trace nodes placed and also had the user trace, but the problem still remains. The File trace just says this,

(
(0x01000000):Properties = (
(0x03000000):MessageSet = ''
(0x03000000):MessageType = ''
(0x03000000):MessageFormat = ''
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 1208
(0x03000000):Transactional = FALSE
(0x03000000):Persistence = FALSE
(0x03000000):CreationTime = GMTTIMESTAMP '2009-12-03 09:36:56.310'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
(0x03000000):ContentType = 'text/xml;charset=utf-8'
)
(0x01000000):HTTPResponseHeader = (
(0x03000000):X-Original-HTTP-Status-Line = 'HTTP/1.1 200 OK'
(0x03000000):X-Original-HTTP-Status-Code = 200
(0x03000000):Content-Type = 'text/xml;charset=utf-8'
(0x03000000):Content-Length = '37'
(0x03000000):Date = 'Thu, 03 Dec 2009 09:37:16 GMT'
(0x03000000):Server = 'Apache-Coyote/1.1'
(0x03000000):Connection = 'close'
)
(0x01000000):XMLNSC = (
(0x03000000):Test = 'From Client'
)
)

(
(0x01000000):RecoverableException = (
(0x03000000):File = 'F:\build\S000_P\src\DataFlowEngine\ImbDataFlowNode.cpp'
(0x03000000):Line = 616
(0x03000000):Function = 'ImbDataFlowNode::createExceptionList'
(0x03000000):Type = 'ComIbmMQOutputNode'
(0x03000000):Name = 'ClientFlow#FCMComposite_1_2'
(0x03000000):Label = 'ClientFlow.MQOutput'
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Severity = 3
(0x03000000):Number = 2230
(0x03000000):Text = 'Node throwing exception'
(0x01000000):MessageException = (
(0x03000000):File = 'F:\build\S000_P\src\DataFlowEngine\ImbMqOutputNode.cpp'
(0x03000000):Line = 635
(0x03000000):Function = 'ImbMqOutputNode::evaluate'
(0x03000000):Type = 'ComIbmMQOutputNode'
(0x03000000):Name = 'ClientFlow#FCMComposite_1_2'
(0x03000000):Label = 'ClientFlow.MQOutput'
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Severity = 3
(0x03000000):Number = 2660
(0x03000000):Text = 'Message contains no data'
(0x01000000):Insert = (
(0x03000000):Type = 2
(0x03000000):Text = '-1'
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = 'MQW001'
)
(0x01000000):Insert = (
(0x03000000):Type = 2
(0x03000000):Text = '0'
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = ''
)
)
)
)

and the user trace says,

Reply message successfully sent by reply node 'ServerFlow.HTTP Reply' to the requesting HTTP client via WebSphere Message Brokers queue 'SYSTEM.BROKER.WS.REPLY' connected to queue manager 'WBRK6_DEFAULT_QUEUE_MANAGER'.
No user action required.
2009-12-03 14:16:55.194099 5332 UserTrace BIP4007I: Message propagated to 'out' terminal of node 'ClientFlow.HTTP Request'.
2009-12-03 14:16:55.202098 5332 Error BIP2628E: Exception condition detected on input node 'ClientFlow.MQInput'.
The input node 'ClientFlow.MQInput' detected an error whilst processing a message. The message flow has been rolled-back and, if the message was being processed in a unit of work, it will remain on the input queue to be processed again. Following messages will indicate the cause of this exception.
Check the error messages which follow to determine why the exception was generated, and take action as described by those messages.
2009-12-03 14:16:55.202098 5332 RecoverableException BIP2230E: Error detected whilst processing a message in node 'ClientFlow.MQOutput'.
The message broker detected an error whilst processing a message in node 'ClientFlow.MQOutput'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.


The reply comes back to the client flow and we can see that in both the traces, but when it goes to the output node the error occurs.
Back to top
View user's profile Send private message Send e-mail
mgk
PostPosted: Fri Dec 04, 2009 12:53 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

If I remember correctly in 6.0 you need to add an MQMD header to the message before the MQOutput node as it does not generate a default one. I think in 6.1 and above it generates one for you... As you are doing a simple POC, have you looked as the wshost sample provided with the product as it demonstrates use of the http nodes and MQ?

Kind Regards,
_________________
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
kash3338
PostPosted: Fri Dec 04, 2009 2:06 am    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

mgk wrote:
If I remember correctly in 6.0 you need to add an MQMD header to the message before the MQOutput node as it does not generate a default one. I think in 6.1 and above it generates one for you... As you are doing a simple POC, have you looked as the wshost sample provided with the product as it demonstrates use of the http nodes and MQ?

Kind Regards,


The WSHost sapmples provided does not depict a scenario where in the HTTPRequest node is used. Also that sample does not help in this purpose.

Actually, we tried having a compute node after the HTTPRequest node and before the MQOutput node and had copy message headers in it. Still got this same error message.
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Fri Dec 04, 2009 2:57 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Using "CopyHeaders" in a Compute Node will copy ALL HEADERS.

To use an MQOutput Node (ideally) you should hve only MQ Related headers.
As a minimum
- Properties
- MQMD
- OutputRoot

There are optional MQ Headers such as RFH2 that can be used as well.
Therefore, I'd probably copy the Properties folder, create the MQMD as the next child and add the Data into OutputRoot.

Whenever I've written a HTTP to MQ flow, I specifically create the MQMD in the right place in the output folder tree and it works.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
AkankshA
PostPosted: Fri Dec 04, 2009 4:01 am    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

CopyHeaders will copy all headers and since its HTTP to MQ, your HTTP header might also be present

so its better to build the headers in sequence .. as smdavis99 said..
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
kash3338
PostPosted: Sun Dec 06, 2009 9:39 pm    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

smdavies99 wrote:
Using "CopyHeaders" in a Compute Node will copy ALL HEADERS.

To use an MQOutput Node (ideally) you should hve only MQ Related headers.
As a minimum
- Properties
- MQMD
- OutputRoot

There are optional MQ Headers such as RFH2 that can be used as well.
Therefore, I'd probably copy the Properties folder, create the MQMD as the next child and add the Data into OutputRoot.

Whenever I've written a HTTP to MQ flow, I specifically create the MQMD in the right place in the output folder tree and it works.


Thanks a lot smdavies99.. this approch worked for us. Since we were working on MB 6.1 in our pervious assignment we dint know this. I followed this approch now and it worked,
copied the Properties folder, created the MQMD as the next child and added the Data into OutputRoot.

Thanks again.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Problem with Web services in MB 6.0
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.