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 » ATOM Format

Post new topic  Reply to topic
 ATOM Format « View previous topic :: View next topic » 
Author Message
CAONIMA
PostPosted: Mon Jun 15, 2015 10:03 am    Post subject: ATOM Format Reply with quote

Acolyte

Joined: 03 Dec 2014
Posts: 65

Hi Guys,

I have question about the ATOM message format.

Here is the sample of the ATOM message.

Code:
<entry
    xmlns="http://www.w3.org/2005/Atom"
    xmlns:app="http://www.w3.org/2007/app"
    xmlns:snx="http://www.ibm.com/xmlns/prod/sn"
    xmlns:xhtml="http://www.w3.org/1999/xhtml"
    xmlns:thr="http://purl.org/syndication/thread/1.0"
  >
    <title type="text">QAZWSX</title>

    <category scheme="http://www.ibm.com/xmlns/prod/sn/type" term="activity" label="Activity"/>
    <category scheme="http://www.ibm.com/xmlns/prod/sn/priority" term="1" label="Normal"/>
    <category term="tag1" />
    <category term="tag2" />



    <snx:icon>https://activities/nav/common/images/iconActivities16.png</snx:icon>
    <content type="html">
             GoalO
           </content>
</entry>


I am using the HTTP Input Node to purchase the message, and select the message domain as "XMLNSC", is that right?

And how to construct a message using compute node with ESQL? For example, like the
Code:
<title type="text">QAZWSX</title>
, How can I write the query to crab the "QAZWSX" ?

Many thanks.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Jun 15, 2015 10:18 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

The bit about base64 encoding is obsolete in newer versions of broker - ESQL has normal routines to do it. And you can do basic authentication in a much easier way on the http nodes.

http://www.ibm.com/developerworks/lotus/library/connections-social-authoring/

But otherwise you access your title field d under the XMLNSC domain in the same way you access any other field.
Back to top
View user's profile Send private message
CAONIMA
PostPosted: Mon Jun 15, 2015 10:48 am    Post subject: Reply with quote

Acolyte

Joined: 03 Dec 2014
Posts: 65

mqjeff wrote:
The bit about base64 encoding is obsolete in newer versions of broker - ESQL has normal routines to do it. And you can do basic authentication in a much easier way on the http nodes.

http://www.ibm.com/developerworks/lotus/library/connections-social-authoring/

But otherwise you access your title field d under the XMLNSC domain in the same way you access any other field.


Thank you for your reply.

The URL you provided cannot be opened.

I worte the
Code:
SET Environment.Variable.Title = InputRoot.XMLNSC.entry.title

It returns null.

I cannot point the filed.

Many thanks.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Jun 15, 2015 11:19 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

CAONIMA wrote:
http://www.ibm.com/developerworks/lotus/library/connections-social-authoring/
The URL you provided cannot be opened.
Many thanks.

Are you sure that isn't just a feature of your firewall? I can access it just fine.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Mon Jun 15, 2015 11:38 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Entry and title have namespaces.

I did have some trouble accessing the link, because of intermittent proxy/http errors.

but if you try a couple of times, you should reach it.
Back to top
View user's profile Send private message
CAONIMA
PostPosted: Mon Jun 15, 2015 11:46 am    Post subject: Reply with quote

Acolyte

Joined: 03 Dec 2014
Posts: 65

fjb_saper wrote:
CAONIMA wrote:
http://www.ibm.com/developerworks/lotus/library/connections-social-authoring/
The URL you provided cannot be opened.
Many thanks.

Are you sure that isn't just a feature of your firewall? I can access it just fine.


Thank you for your reply.

I can open the page now.

The problem is I have already had the ATOM message , I want to crab the filed value. How can I query this?

Many thanks!
Back to top
View user's profile Send private message
CAONIMA
PostPosted: Mon Jun 15, 2015 11:50 am    Post subject: Reply with quote

Acolyte

Joined: 03 Dec 2014
Posts: 65

mqjeff wrote:
Entry and title have namespaces.

I did have some trouble accessing the link, because of intermittent proxy/http errors.

but if you try a couple of times, you should reach it.


Thank you for your nice suggestions.

I can open the page now.

Can you show me how can I write the namespaces to take the field value based on my Atom message.

Quote:
<title type="text">QAZWSX</title>


Many thanks!
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Jun 15, 2015 11:59 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You address fields in the XMNLSC tree using namespaces in the standard, documented ways.

There's nothing different for ATOM formatted XML messages than any others.

Put a trace node before your ESQL node.

Look at the message tree that's reported from the trace node.
Back to top
View user's profile Send private message
CAONIMA
PostPosted: Mon Jun 15, 2015 12:34 pm    Post subject: Reply with quote

Acolyte

Joined: 03 Dec 2014
Posts: 65

mqjeff wrote:
You address fields in the XMNLSC tree using namespaces in the standard, documented ways.

There's nothing different for ATOM formatted XML messages than any others.

Put a trace node before your ESQL node.

Look at the message tree that's reported from the trace node.


Thank you for your reply.

I don't get any error.

My code is
Code:
 DECLARE InRef REFERENCE TO InputRoot.XMLNSC.entry;

SET Environment.Variable.DATA = FIELDVALUE(InRef.title);


I still cannot get the value.
Can you help me to write the query?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Jun 15, 2015 12:37 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I'm not saying you will get an error.

I'm saying your code is wrong, and the trace node of $Root will show you what the logical message tree looks like, so you can know how to fix your code.

Or you could simply read the documentation on XMLNSC and namespaces.
Back to top
View user's profile Send private message
CAONIMA
PostPosted: Tue Jun 16, 2015 5:05 am    Post subject: Reply with quote

Acolyte

Joined: 03 Dec 2014
Posts: 65

mqjeff wrote:
I'm not saying you will get an error.

I'm saying your code is wrong, and the trace node of $Root will show you what the logical message tree looks like, so you can know how to fix your code.

Or you could simply read the documentation on XMLNSC and namespaces.


Thank you for your reply, the problem solved!!
Back to top
View user's profile Send private message
CAONIMA
PostPosted: Tue Jun 16, 2015 11:16 am    Post subject: Reply with quote

Acolyte

Joined: 03 Dec 2014
Posts: 65

Hi All,

I have another question, after I
Code:
 SET OutputRoot.HTTPRequestHeader."Content-Type"= 'application/atom+xml';
      
      SET OutputRoot.HTTPRequestHeader."Authorization" = 'Basic '||BASE64ENCODE(CAST(user||':'||password as BLOB CCSID InputRoot.Properties.CodedCharSetId));


The values returns good.

But the IIB returns an exception said:

Code:
Text:CHARACTER:An error occurred whilst performing an SSL socket operation
                                 Insert
                                       Type:INTEGER:5
                                       Text:CHARACTER:connect
                                 Insert
                                       Type:INTEGER:5
                                       Text:CHARACTER:javax.net.ssl.SSLKeyException: RSA premaster secret error


How can I solve that?

Many thanks!
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jun 16, 2015 11:23 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Again, you don't need to build the Basic Auth header any more.

Your error looks like an ssl error connecting to the server you're talking to.
Back to top
View user's profile Send private message
CAONIMA
PostPosted: Tue Jun 16, 2015 11:44 am    Post subject: Reply with quote

Acolyte

Joined: 03 Dec 2014
Posts: 65

mqjeff wrote:
Again, you don't need to build the Basic Auth header any more.

Your error looks like an ssl error connecting to the server you're talking to.


Thank you for your patient.

You mean I don't need to

Code:
  SET OutputRoot.HTTPRequestHeader."Authorization" = 'Basic '||BASE64ENCODE(CAST(user||':'||password as BLOB CCSID InputRoot.Properties.CodedCharSetId));


The IIB will set the basic Authorization automatically?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jun 16, 2015 11:53 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You can configure the HTTPRequest node, using a security policy, to add the basic AUTH.

http://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ap04050_.htm
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 » ATOM Format
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.