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 » Validation Failed

Post new topic  Reply to topic
 Validation Failed « View previous topic :: View next topic » 
Author Message
cvag
PostPosted: Wed Jun 22, 2011 4:24 am    Post subject: Validation Failed Reply with quote

Centurion

Joined: 17 Mar 2008
Posts: 127

Hi,
I have a webservice scenario, of request response type.
HttpInput --> Compute( Construct Reponse) --> HttpReply

Created the messagedefinition file using wsdl (having Request and Response in the same).
Am parsing the SOAP message with XMLNSC domain and enabled the strict validation (Parse timing to 'Immediate' and Validation to 'Content and Value').

When i pass the Request messages (with valid and invalid) through nettool, the message is getting validated against the defintion and getting response back to the client successfully. But when i push the empty request message, still the message is flowing to the downstream nodes crossing HttpInput and getting the response back with empty values.

Could you please let me know, why the validation is not working in this case and correct me if i missed anything.

Thanks,
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Jun 22, 2011 7:01 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
But when i push the empty request message, still the message is flowing to the downstream nodes crossing HttpInput and getting the response back with empty values.
It may be possible to fix this by tightening up the rules in the xsd, but I need to see what the 'empty request message' looks like. Please can you quote the actual XML ( ideally using [c o d e] tags to keep it readable ).
Back to top
View user's profile Send private message
cvag
PostPosted: Wed Jun 22, 2011 12:16 pm    Post subject: Reply with quote

Centurion

Joined: 17 Mar 2008
Posts: 127

Thanks Kimbert for your response,

Here "empty request message", what i mean is: am not sending any kind of xml message, just am hitting the service url [ SEND ] button on nettool using POST method.

There is no XML message sending, its a dummy.

In debug mode can able to view only the properties and Http Headers generating with no messageBody crossing the HttpInput, without generating any SOAP fault though validation enabled strictly at HttpInput.

Validation is getting overruled here for me,

Please suggest

Thanks.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jun 23, 2011 12:35 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
There is no XML message sending
Well, SOAP is an XML-based protocol, so there should be *some* XML being sent - otherwise it is not a valid SOAP message.
It seems to me that you should be using the SOAPInput node, not the HttpInput node. Then you would probably get an error telling you that the request was not a valid SOAP message.
Back to top
View user's profile Send private message
cvag
PostPosted: Thu Jun 23, 2011 1:06 am    Post subject: Reply with quote

Centurion

Joined: 17 Mar 2008
Posts: 127

Thanks Kimbert,

This works fine, when i replace HttpInput node with SOAPInput.
SOAPInput is looking for the structure, so when i put the null message(just click the url), its generating SOAP fault

<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode></faultcode><faultstring>Invalid Content-Type HTTP Header. Content-Type was missing, malformed or null.</faultstring><detail><Exception>org.apache.axis2.AxisFault: Invalid Content-Type HTTP Header. Content-Type was missing, malformed or null.&#xD; at com.ibm.broker.axis2.SoapUtilities.createSOAPMessage(SoapUtilities.java:1838)&#xD; at com.ibm.broker.axis2.SoapUtilities.createSOAPMessage(SoapUtilities.java:1807)&#xD; at com.ibm.broker.axis2.Axis2Invoker.processInboundRequest(Axis2Invoker.java:2230)&#xD; at com.ibm.broker.axis2.Axis2Invoker.invokeAxis2OverHTTP(Axis2Invoker.java:1969)&#xD; at com.ibm.broker.axis2.TomcatNodeRegistrationUtil.invokeAXIS2(TomcatNodeRegistrationUtil.java:302)&#xD;
</Exception></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>

If the same case with HttpInput, handling null message will fail in validating with WSDL definition.

Can you please suggest, is there any way to handle this scenario with HttpInput OR surely opt for SOAPInput?

Thanks,
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jun 23, 2011 1:12 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I'm just wondering why you want to use HttpInput, when SOAPInput is the natural choice, and seems to work better...?
Back to top
View user's profile Send private message
cvag
PostPosted: Thu Jun 23, 2011 1:13 am    Post subject: Reply with quote

Centurion

Joined: 17 Mar 2008
Posts: 127

Could you please confirm, if that is the case i would change my requirement using SOAP nodes instead of Http, as Http fails in validating null requests with the message definition.

Thanks.
Back to top
View user's profile Send private message
cvag
PostPosted: Thu Jun 23, 2011 1:17 am    Post subject: Reply with quote

Centurion

Joined: 17 Mar 2008
Posts: 127

No Kimbert,
This is a project requirement, i can't change on of a sudden without having any analysis or doing any tests.
So according i can move ahead and suggest the alternate

Thanks for your valuable inputs.
Back to top
View user's profile Send private message
bielesibub
PostPosted: Thu Jun 23, 2011 4:56 am    Post subject: Reply with quote

Apprentice

Joined: 02 Jul 2008
Posts: 40
Location: Hampshire, UK

Sorry to gatecrash... it's possibly relevant.. I'm using SOAPInput nodes with v7.0.0.2 with validation set to "content and value" and can't get the nodes to raise an exception when I pass in malformed messages..

For example I'm able to send in something like;

<ns:messageRequest>
<someDuffElement>blah<someDuffElement> <!-- Note the lack of slash -->
<ns:expectedElement>blah</ns:expectedElement>
</ns:messageRequest>

This pops into the message flow with a null SOAP element.. ? I'm pretty sure exceptions were being raised previously? Am I being a numpty?
Back to top
View user's profile Send private message MSN Messenger
cvag
PostPosted: Thu Jun 23, 2011 5:54 am    Post subject: Reply with quote

Centurion

Joined: 17 Mar 2008
Posts: 127

Hi bielesibub,
Exception will not raise as null SOAP element, it raises Parser Exception: saying end tag not closed properly somewat like that.., and if would like to throw an exception at the Input node itself.. configure the Parse Timing option to either Immediate or Complete and validation as Content and Value.

Thanks
Back to top
View user's profile Send private message
bielesibub
PostPosted: Thu Jun 23, 2011 7:41 am    Post subject: Reply with quote

Apprentice

Joined: 02 Jul 2008
Posts: 40
Location: Hampshire, UK

Hi cvag and all,

Think I've discovered what was causing my issue...

The SOAPInput node is configured with event monitoring enabled on the Out terminal, if monitoring is active the SOAPInput node lets an invalid message through, if monitoring is inactive the SOAPInput node correctly raises an exception saying that an unexpected element was discovered.

I think I need to raise this as an issue in a PMR.

Cheers all
Back to top
View user's profile Send private message MSN Messenger
kimbert
PostPosted: Thu Jun 23, 2011 8:41 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
I think I need to raise this as an issue in a PMR.
I agree - please do.
Back to top
View user's profile Send private message
bielesibub
PostPosted: Fri Jun 24, 2011 1:14 am    Post subject: Reply with quote

Apprentice

Joined: 02 Jul 2008
Posts: 40
Location: Hampshire, UK

Cheers kimbert, PMR should be raised shortly.
Back to top
View user's profile Send private message MSN Messenger
cvag
PostPosted: Wed Jun 29, 2011 1:12 am    Post subject: Reply with quote

Centurion

Joined: 17 Mar 2008
Posts: 127

Quote:
This pops into the message flow with a null SOAP element.. ? I'm pretty sure exceptions were being raised previously? Am I being a numpty?


Hi bielesibub,
Can you please clarify me once again, bcoz as you said i have tested the scenario having SOAPInput node with Invalid SOAP message removing '/' for one of the element.

But i could able to have the relevant exception[SOAP fault] throwing at SOAPInput node itself.

Can you please try with different parsing options, i think you are configuring OnDemand option so you are able to cross SOAPInput.

Please try with Immediate or Complete options and let me know.

Thanks[/code]
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 » Validation Failed
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.