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 » xml message

Post new topic  Reply to topic
 xml message « View previous topic :: View next topic » 
Author Message
chris boehnke
PostPosted: Thu Dec 22, 2011 5:03 pm    Post subject: xml message Reply with quote

Partisan

Joined: 25 Jul 2006
Posts: 369

Hi Guys,

I would like to know if we can use xmlns parser for xml messages( with no namespace). something like below. I added soap headers to xml message using soap envelope node. Will this throw parsing errors? is this a valid xml? Pls suggest.

Quote:
<?xml version="1.0"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<requestAvailability>
<carDetails>body1</carDetails>
<claimID>body2</claimID>
<location>body3</location>
<reqDate>body4</reqDate>
</requestAvailability>
</soapenv:Body>
</soapenv:Envelope>



Thanks
chris
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Dec 22, 2011 6:43 pm    Post subject: Re: xml message Reply with quote

Grand High Poobah

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

chris boehnke wrote:
I would like to know if we can use xmlns parser for xml messages( with no namespace).


Yes. Why would you want to?

chris boehnke wrote:
Will this throw parsing errors? is this a valid xml?


Open the file with IE, XMLSpy or similar tool. If it opens it's valid.

An XML document with SOAP headers is still an XML document.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Dec 22, 2011 11:28 pm    Post subject: Re: xml message Reply with quote

Jedi Council

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

Vitor wrote:


Open the file with IE, XMLSpy or similar tool. If it opens it's valid.


That is not always the case.
The XML might very well be syntactically valid but the next step in WebService land is 'is it valid when I test it against my WSDL/XSD'.
You would be surprised at how many publicly accessible WebServices do not validate against their published WSDL/XSD. I won't name names but I can count at least 8 I've come upon in the past 18 or so months.

I'd use a nice little free tool called SOAP-UI.
you can load your WSDL&XSD into it and test your webservice with it. There is also a nice little option that will validate some XML against the WSDL/XSD.
It will generate sample messages but you can easily paste in one of your own and validate it.
An essential tool for this sort of work.
There is a PRO version which costs a lot less than XML/SPY. Ok, so different functionality but IMHO SOAP-UI is one utility I'd not be without.
_________________
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
Vitor
PostPosted: Fri Dec 23, 2011 5:57 am    Post subject: Re: xml message Reply with quote

Grand High Poobah

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

smdavies99 wrote:
That is not always the case.
The XML might very well be syntactically valid but the next step in WebService land is 'is it valid when I test it against my WSDL/XSD'.


Ok, I'm guilty of typing while under the influence.

Is the sense the OP meant "valid", it's a valid way of processing XML.

Now is the XML "valid" in the W3C sense of valid, i.e. does it conform to the matching XSD? rather than "well formed", i.e. syntacticly correct XML?

I defer to the wise words of my associate on this matter.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kimbert
PostPosted: Sat Dec 24, 2011 9:42 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You should use XMLNSC, not XMLNS.
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 » xml message
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.