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 » Help with parsing SOAP input

Post new topic  Reply to topic
 Help with parsing SOAP input « View previous topic :: View next topic » 
Author Message
tillchad
PostPosted: Mon Apr 08, 2013 4:55 am    Post subject: Help with parsing SOAP input Reply with quote

Newbie

Joined: 17 Dec 2010
Posts: 4

I'm having trouble coming up with the namespace declarations and parse syntax to get at the ChannelCode.

Code:

<m:calculate xmlns:m="http://soap.sforce.com/schemas/class/Service">
   <ServiceInput>
    <ChannelCode>10</ChannelCode>
    </ServiceInput>
 </m:calculate>


I'm not sure what that "m:" is in front of the calculate or howto reference it.

If they don't send me the m: that below works, but with that m: it does not.


Code:

DECLARE ns1 NAMESPACE 'http://soap.sforce.com/schemas/class/Service';

set Environment.channel_code = InputRoot.XMLNSC.ns1:calculate.ns1:ServiceInput.ns1:ChannelCode;
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Apr 08, 2013 4:57 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Insert a Trace node after your SOAPInput, and copy that namespace letter-for-letter from the Trace output.

Also remove ns1 from ServiceInput and ChannelCode.

Name your variables with meaningful names, ns1 means very little.

Your lead should be InputRoot. SOAP.Body.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
tillchad
PostPosted: Mon Apr 08, 2013 5:24 am    Post subject: Reply with quote

Newbie

Joined: 17 Dec 2010
Posts: 4

Thanks so much for the quick reply.

This is a flow deep after the SOAP node. It takes the soap payload and puts
to a queue. We then pull from that queue and parse as XMLNSC.

Here's the trace. Not sure what to do with that ":m"

Code:
        (0x01000000:Folder)http://soap.sforce.com/schemas/class/Service:calculate = (
          (0x03000102:NamespaceDecl)http://www.w3.org/2000/xmlns/:m = 'http://soap.sforce.com/schemas/class/Service' (CHARACTER)
          (0x01000000:Folder       ):ServiceInput                       = (
            (0x03000000:PCDataField):ChannelCode = '10' (CHARACTER)
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Apr 08, 2013 5:30 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Within the XML doc, m is shorthand for 'http://soap.sforce.com/schemas/class/Service'. You may disregard it, since you want to reference the namespace in its long form.

Have you attended the training? Would be good for you to go, to get interactive conversation with other students and the instructor.

There are 9 days of training on the developer roadmap.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
tillchad
PostPosted: Mon Apr 08, 2013 6:47 am    Post subject: Reply with quote

Newbie

Joined: 17 Dec 2010
Posts: 4

No training yet.......

So the below should work then? It's not.


Code:

DECLARE ns1 NAMESPACE 'http://soap.sforce.com/schemas/class/Service';

set Environment.channel_code = InputRoot.XMLNSC.ns1:calculate.ServiceInput.ChannelCode;
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Apr 08, 2013 6:53 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

The m: is an XML namespace prefix.

If you do not know what a namespace prefix is, can I politely suggest that you find out, and do it quickly. The W3Schools XML tutorial is quite good.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Apr 08, 2013 6:56 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

tillchad wrote:
No training yet.......

So the below should work then? It's not.


Code:

DECLARE ns1 NAMESPACE 'http://soap.sforce.com/schemas/class/Service';

set Environment.channel_code = InputRoot.XMLNSC.ns1:calculate.ServiceInput.ChannelCode;


Your training would teach you how to solve this problem. Reading the InfoCentre would also help you. Trying out several of the samples provided with the toolkit would help as well.

If you post ${Root} from your Trace node, we could see the whole payload and tell you what you need to do.

The current post shows this:

ns1:calculate.ServiceInput.ChannelCode;

It does not show what comes prior to that.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Mon Apr 08, 2013 7:01 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.

lancelotlinc wrote:


There are 9 days of training on the developer roadmap.


Sigh,

Please remember that not all NINE days of training are scheduled everywhere in the world. In some places the second part is merely a wish list on the schedule. There are parts of the world where things are very different to that in the USA.
I'm off to Chennai (again) in a few hours and I know that the skill levels of the local devs is pretty limited. There are NO funds available for training. Please suggest how these people can meet your lofty requirements other than sometimes asking some pretty dumb questions. (at least the lot I'm going to see ask questions and don't just say, 'I have this requirement')
_________________
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
lancelotlinc
PostPosted: Mon Apr 08, 2013 7:07 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

smdavies99 wrote:
lancelotlinc wrote:


There are 9 days of training on the developer roadmap.


Sigh,

Please remember that not all NINE days of training are scheduled everywhere in the world. In some places the second part is merely a wish list on the schedule. There are parts of the world where things are very different to that in the USA.
I'm off to Chennai (again) in a few hours and I know that the skill levels of the local devs is pretty limited. There are NO funds available for training. Please suggest how these people can meet your lofty requirements other than sometimes asking some pretty dumb questions. (at least the lot I'm going to see ask questions and don't just say, 'I have this requirement')


There are options for all peoples, and if one has an internet connection, one need not travel.

The 9-day developer roadmap is not owned by me. It's not my requirement, and certainly not limited to USA students.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Mon Apr 08, 2013 7:51 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.

and if there is no money for training?
What then?

This is more common that you might like to think especially at IBM US $$$$$$ rates
_________________
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
lancelotlinc
PostPosted: Mon Apr 08, 2013 7:58 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

smdavies99 wrote:
and if there is no money for training?
What then?

This is more common that you might like to think especially at IBM US $$$$$$ rates


Coaching, mentoring, compiling/deploying the included sample programs, and reading the InfoCentre are all good 'no-cost' options.

I've seen objections to posts occur when none of the above are pursued and the poster expects to be hand-fed by the people who have invested (effort and finances) in their own destiny.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Mon Apr 08, 2013 9:08 am    Post subject: Reply with quote

Grand High Poobah

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

lancelotlinc wrote:
I've seen objections to posts occur when none of the above are pursued and the poster expects to be hand-fed by the people who have invested (effort and finances) in their own destiny.


True, and this is the flip side of the coin to where a link to training is given as the answer to every question.
_________________
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 » Help with parsing SOAP input
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.