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 » SOAP validation via MQ

Post new topic  Reply to topic
 SOAP validation via MQ « View previous topic :: View next topic » 
Author Message
humble1234
PostPosted: Wed Jul 25, 2018 6:18 am    Post subject: SOAP validation via MQ Reply with quote

Newbie

Joined: 25 Jul 2018
Posts: 3

Hi
First please accept I am a newbie, but have tried to read as much as possible.

OK i have been given a WSDL but my TA wishes we use MQ not a SOAP node to vlaidate the incoming request, so I believe (and this is hopefully my understanding) that WSDL provides both client service details as well as the XSD that defines the "message" so I was looking to use these xsds in a Library and then referenced this library from my Application. There is a top level XSD which imports multiple other XSDs so my first question is it best to leave these XSDs as individuals or do i "merge" all XSDs into one?

Second I imported the WSDL into another Library already and tried to access that from an MQInput node on the understanding that the domain type would be DFDL (not expecting the full wsdl but to be able to use the XSDs defined after the import) that the library was referenced by the project and that the message was all that needed to be defined but when selecting the link to get messages it does not provide any "artefeacts from within the referenced library. Is this what everyone would expect or am I being stupid (i expect the latter)
Please go easy on your replies maybe my understanidng of the documentaton may need some revision
Thank you in advancement
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jul 25, 2018 6:39 am    Post subject: Re: SOAP validation via MQ Reply with quote

Grand High Poobah

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

humble1234 wrote:
OK i have been given a WSDL but my TA wishes we use MQ not a SOAP node to vlaidate the incoming request


Ask your TA what drives this very odd idea. The SOAP node automatically validates the incoming message based on the WSDL and is perfectly capable of using MQ or HTTP as a transport layer. This is a really good wheel so I struggle to understand why you're being asked to invent a new one.

Unless your TA thinks the SOAP node only supports HTTP and you have to use an MQ node, in which case he's just flat out mistaken.

humble1234 wrote:
so I believe (and this is hopefully my understanding) that WSDL provides both client service details as well as the XSD that defines the "message" so I was looking to use these xsds in a Library and then referenced this library from my Application. There is a top level XSD which imports multiple other XSDs so my first question is it best to leave these XSDs as individuals or do i "merge" all XSDs into one?


Leave them separate, import the WSDL and let the Toolkit work it out.

humble1234 wrote:
Second I imported the WSDL into another Library already and tried to access that from an MQInput node on the understanding that the domain type would be DFDL (not expecting the full wsdl but to be able to use the XSDs defined after the import) that the library was referenced by the project and that the message was all that needed to be defined but when selecting the link to get messages it does not provide any "artefeacts from within the referenced library. Is this what everyone would expect or am I being stupid (i expect the latter)


It's exactly what I would expect if you try to reference an XML message (described in the WSDL) using the DFDL domain (used to model non-self describing formats). XML messages are processed using the XMLNSC domain, and the XML parser will figure out which XSD you mean based on root tag name. You'd see the same issue with JSON.

But again, if you have a WSDL use a SOAP node. If you need to use any SOAP features (WS-Security, WS-A, etc.) then you'll need to augment the MQInput node with a ton of custom code to get to the same level of functionality the SOAP node provides out of the box.

humble1234 wrote:
maybe my understanidng of the documentaton may need some revision


Yeah. Your TA may be in the same position.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
timber
PostPosted: Wed Jul 25, 2018 6:59 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

Everything that Vitor said is true, and you should act on it.

re: this point:
Quote:
OK i have been given a WSDL but my TA wishes we use MQ not a SOAP node to vlaidate the incoming request,

Two very important questions:
1. How does the message arrive at IIB? Over HTTP, or over MQ?
2. Does it have a SOAP envelope, or is it just a normal XML document?
Back to top
View user's profile Send private message
humble1234
PostPosted: Wed Jul 25, 2018 7:19 am    Post subject: Reply with quote

Newbie

Joined: 25 Jul 2018
Posts: 3

Hi

First thank you both for your prompt replies.

@kimbert -
1) The message is being delivered to IIB via MQ client connection, I had asked why not use HTTP but....well anyway MQ it is so....
2) yes there is a full soap envelope after the xml declaration

I had initially created a test flow that just used the XMLNSC parser to parse the message, but was not 100% sure on how to tie in the XSDs (either as one or as Vitor says leave as separate) in order to validate that as the real "Body" of the messages is under the soapenv:Body element and would use a soap extract node to remove that part (i presume)

@Vitor - from what you are saying i can use the SOAP Input (i have just read some on this but inexperience assumed it was just for SOAP HTTP) i will look into this for the MQ transport side - is there "mines" in using this that i have to take into account, I dont at this point want to wander of depth down a rabbit hole

thanks again
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jul 25, 2018 7:37 am    Post subject: Reply with quote

Grand High Poobah

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

humble1234 wrote:
The message is being delivered to IIB via MQ client connection, I had asked why not use HTTP but....well anyway MQ it is so....


Why not MQ? It's not common, but it does happen (hence IBM building support for it into the SOAP nodes.

humble1234 wrote:
in order to validate that as the real "Body" of the messages is under the soapenv:Body element and would use a soap extract node to remove that part (i presume)


You presume wrong. The SOAP node will automatically validate the body of the message against the XSD indicated and will strip the envelope off before presenting the message tree to the next node in your flow.

When I said you'd need custom code to achieve with the MQ node what the SOAP node provides, I (perhaps misleadingly) included additional nodes in with the concept of "custom code".

humble1234 wrote:
is there "mines" in using this that i have to take into account


Nope.

humble1234 wrote:
I dont at this point want to wander of depth down a rabbit hole


The only think to consider is to configure the SOAPInput node to use the MQ details rather than present an HTTP endpoint. Once the payload is delivered to the node, it behaves the same way in terms of validation & function irrespective of delivery.

You should ask how whoever's sending the message how (or if) they want a SOAP fault returned to them if the payload fails validation. I suspect they don't want a fault but will want it logged on the IIB side, but that's just my suspicion.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
humble1234
PostPosted: Wed Jul 25, 2018 8:03 am    Post subject: Reply with quote

Newbie

Joined: 25 Jul 2018
Posts: 3

OK, so with some brave pants on I have had a look into the use of MQ as the transport and if you are happy to oblige would like to pick your brains further about its configuration thereof. Can I ask before though - the message i am led to believe is just a "plain" MQ message sent from apparently App Connect Professional and from the example given to me is just an "ordinary" MQ message no different than the one i had cobbled together via rfhutil, so is this still OK or for JMS am i expecting anything different? (if there is some docs on this i would be better reading first please let me know)
Next, having chosen the JMS route in SOAP node it asks me for two things now i have selected WebsphereMQ as my JMS provider 1) JNDI URL for bindings and Connection Factory name - where would i find these or are those that come with the MQ Java classes package and i just need to point this to that? If the aforementioned is correct is there a "preferred" place to put these so they are secure for all environments?

On reflection i can now see that the envelope is dispensed with after the input node validation so apologies for soap extract assumption.

Appreciate all your patience here...
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jul 25, 2018 8:42 am    Post subject: Reply with quote

Grand High Poobah

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

humble1234 wrote:
the message i am led to believe is just a "plain" MQ message sent from apparently App Connect Professional and from the example given to me is just an "ordinary" MQ message no different than the one i had cobbled together via rfhutil, so is this still OK or for JMS am i expecting anything different?


Seen one MQ message, seen them all. Only the content of the payload differs; in your case it's an XML document in SOAP format, MQ does not differentiate between that and a fixed length z/OS COBOL-produced message or a piece of JSON.

humble1234 wrote:
Next, having chosen the JMS route in SOAP node it asks me for two things now i have selected WebsphereMQ as my JMS provider 1) JNDI URL for bindings and Connection Factory name - where would i find these


You'd ask the MQ administrator for the queue manager you're connecting to.

humble1234 wrote:
is there a "preferred" place to put these so they are secure for all environments?


I'll defer to my more Java-literate associates for best practice advice in this area.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » SOAP validation via MQ
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.