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 UI validated message failing in validation Node of WMB

Post new topic  Reply to topic
 SOAP UI validated message failing in validation Node of WMB « View previous topic :: View next topic » 
Author Message
stunned
PostPosted: Tue Mar 06, 2012 3:51 pm    Post subject: SOAP UI validated message failing in validation Node of WMB Reply with quote

Newbie

Joined: 06 Mar 2012
Posts: 7

I am facing a problem in message broker where my message is failing in a validation node. Its giving me a exception saying

"cvc-complex-type.2.4.a: Expecting element with local name "Request" but saw "NS2:Request"."

My current flow architecture is like:-

SOAP INPUT Node --> SOAP Extract Node ---> Route to Label node ---> Label Node---> Subflow ---> SOAP Reply Node.

I am doing the validation against the message set at the very begining of the subflow.
When I have placed MQOutput Queue in order to see whats going inside the validation Node I can see below message is going inside the Validation Node

<NS1:Read xmlns:NS1="_htp://abc.com/Headers/G2">
<NS2:Request xmlns:NS2="_htp://abc.com/Document/G2">
--------
-----
---
</NS2:Request>
</NS1:Read>

After this I have changed the structure of message which I am sending to validation node
<NS1:Read xmlns:NS1="_htp://abc.com/Headers/G2">
<Request>
--------
-----
---
<Request>
</NS1:Read>

and now I started getting a exception saying
"cvc-complex-type.2.4.a: Expecting element with local name "Request" but saw "Request"."

Please help.
[/b]
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Mar 06, 2012 4:01 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

So, you mean, you changed the syntactic and the semantic meaning of an XML element by removing the namespace, that indicates what logical element the actual tag represents.

And then you experienced a validation error, because the object that previously had a useful name now has a string of characters that has no meaning behind it as a name.
Back to top
View user's profile Send private message
stunned
PostPosted: Tue Mar 06, 2012 4:16 pm    Post subject: Reply with quote

Newbie

Joined: 06 Mar 2012
Posts: 7

The Original message which I am sending from SOAP UI looks like below

<soapenv:Envelope xmlns:docG2="http://abc.com/Document/G2"
xmlns:semaG2="http://abc.com/Headers/G2">
<soapenv:Body>
<abcG2:Read>
<pqrG2:Request>
-------
-------
---

</abcG2:Read>
</pqrG2:Request>
</soapenv:Body>
</soapenv:Envelope>


The transformation in which you are seeing the namespace defined at node level are done by Extract Node of message Broker. After passing from a Extract Node Message is looking like:-

<NS1:Read xmlns:NS1="http://abc.com/Headers/G2">
<NS2:Request xmlns:NS2="http://abc.com/Document/G2">
--------
-----
---
</NS2:Request>
</NS1:Read>

and this is also a valid XML as par XML standards.

I hope I have answered your question.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Mar 06, 2012 4:46 pm    Post subject: Reply with quote

Grand High Poobah

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

stunned wrote:
and this is also a valid XML as par XML standards.


No it's not - it's well formed. It's not valid unless it matches it's schema. What WMB is telling you is that it doesn't because the Request tag is in a namespace where the schema says it doesn't.

I'm inclined to agree with WMB given what you've posted.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqsiuser
PostPosted: Tue Mar 06, 2012 8:06 pm    Post subject: Reply with quote

Yatiri

Joined: 15 Apr 2008
Posts: 637
Location: Germany

Vitor wrote:
I'm inclined to agree with WMB given what you've posted.

Validation of XML against a (xsd) schema during development/error searching really works great (and it is actually a must). @stunned: You should also use a (standalone) XML-Editor (like Vitor does ) to do that. There actually/really is no difference by the result: It is either "valid" or "not valid". Unlike (the) broker (runtime) the tool likely helps you better with correcting your xml or xsd (you'll have to adjust one of them until the tool says "valid"). Then broker will (very very likely) also say "valid" then.
_________________
Just use REFERENCEs
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Mar 07, 2012 2:21 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

@stunned: Your problem is with XML, not WMB. I recommend the W3Schools tutorial on XML and XML Schema.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Mar 07, 2012 2:41 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

stunned wrote:
<NS1:Read xmlns:NS1="http://abc.com/Headers/G2">
<NS2:Request xmlns:NS2="http://abc.com/Document/G2">


This is entirely not the same thing that you posted before.
stunned wrote:
<NS1:Read xmlns:NS1="_htp://abc.com/Headers/G2">
<Request>
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 UI validated message failing in validation Node of WMB
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.