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 » MQSTR

Post new topic  Reply to topic Goto page 1, 2  Next
 MQSTR « View previous topic :: View next topic » 
Author Message
Halloween
PostPosted: Mon Dec 21, 2015 12:32 pm    Post subject: MQSTR Reply with quote

Acolyte

Joined: 11 Mar 2015
Posts: 60

I am getting an XML message as a string from SOAP Input.
I am fetching this XML message and putting as a text MRM into the output queue.

This is the simple requirement which i already did it.

Now when my tech lead browse with some utility tool, he sees the format as empty.
He wants me to set the format as MQSTR
When i add a line OutputRoot.Mqmd. format='MQSTR' it give me wire format error

Can anybody tell me how to avoid this?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Dec 21, 2015 12:38 pm    Post subject: Reply with quote

Grand High Poobah

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

You need to use the constant
Code:
OutputRoot.Mqmd.Format=MQFMT_STRING;


And no space between the . and Format (missed a ctr + space there?)
_________________
MQ & Broker admin


Last edited by fjb_saper on Mon Dec 21, 2015 12:42 pm; edited 2 times in total
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Mon Dec 21, 2015 12:39 pm    Post subject: Re: MQSTR Reply with quote

Grand High Poobah

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

Halloween wrote:
Can anybody tell me how to avoid this?


Capitalize the command correctly and use the constant provided:

Code:

SET OutputRoot.MQMD.Format = MQFMT_STRING;

_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Halloween
PostPosted: Tue Dec 22, 2015 7:00 am    Post subject: Reply with quote

Acolyte

Joined: 11 Mar 2015
Posts: 60

Thank You fjb and Vitor.

I am first setting to MQSTR using the code you sent then i am doing this to parse the XML string to MRM as below

DECLARE xmlString CHARACTER nputRoot.XMLNSC.ns10:processMessage.in0;
CREATE LASTCHILD OF OutputRoot DOMAIN('MRM')PARSE(xmlString, InputProperties.Encoding, InputProperties.CodedCharSetId);


which gives me invalid wire format error
I want this xml string to be the text format on the output queue with format as MQSTR
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Dec 22, 2015 7:21 am    Post subject: Reply with quote

Grand High Poobah

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

Halloween wrote:
Thank You fjb and Vitor.

I am first setting to MQSTR using the code you sent then i am doing this to parse the XML string to MRM as below

DECLARE xmlString CHARACTER nputRoot.XMLNSC.ns10:processMessage.in0;
CREATE LASTCHILD OF OutputRoot DOMAIN('MRM')PARSE(xmlString, InputProperties.Encoding, InputProperties.CodedCharSetId);


which gives me invalid wire format error


Of course it does. What kind of MRM model could you have that could parse an XML document with a single ESQL PARSE statement? Even if you used DFDL (which you should for new development) how could you do this and why would you even if you wanted to.

Halloween wrote:
I want this xml string to be the text format on the output queue with format as MQSTR


I hope you don't mean that you want the XML in character format as a message in the queue. Because if you do then this displays a terrifying lack of knowledge about the IIB product.

Which does this automatically for you, as one of it's key features.

And doesn't require any code if the message is already under the XMLNSC domain, which your code indicates it is.

Unless you mean something by "xml string to be the text format" other than "a human readable string of characters in the payload of a message body" that you've not bothered to mention on this post yet.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Halloween
PostPosted: Tue Dec 22, 2015 7:36 am    Post subject: Reply with quote

Acolyte

Joined: 11 Mar 2015
Posts: 60

So i am getting XML message as string from SOAPUI.
I am trying to display this XML message as text format and format defined as MQSTR on output queue.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Dec 22, 2015 7:41 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

If you are using SOAP UI, then you are using a SOAPInput node that knows about a WSDL.

This will never produce XML data as a string. Unless you have configured the SOAPInput node in Gateway mode.

You do not need to do anything to send an XML message tree to an MQ message as an MQFMT_STRING, other than use an MQInput node.

Go back to your basic training materials. Review again. Review the samples.

Follow the instructions in my sig. Read, Think, Try, Repeat.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Dec 22, 2015 7:42 am    Post subject: Reply with quote

Grand High Poobah

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

Halloween wrote:
So i am getting XML message as string from SOAPUI.
I am trying to display this XML message as text format and format defined as MQSTR on output queue.


So what's wrong with using the CopyEntireMessage supplied procedure and setting up the MQMD? What about that result is wrong for you?

Indeed, why are you using ESQL for this anyway? What's wrong with:
Code:

SOAPInput -> MQHeader -> MQOutput

_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Dec 22, 2015 7:43 am    Post subject: Reply with quote

Grand High Poobah

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

mqjeff wrote:
Go back to your basic training materials. Review again. Review the samples.

Follow the instructions in my sig. Read, Think, Try, Repeat.



_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Halloween
PostPosted: Tue Dec 22, 2015 8:15 am    Post subject: Reply with quote

Acolyte

Joined: 11 Mar 2015
Posts: 60

Yes but i need that XML String as a text format on MQ Output with format defined MQSTR
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Dec 22, 2015 8:31 am    Post subject: Reply with quote

Grand High Poobah

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

Halloween wrote:
Yes but i need that XML String as a text format on MQ Output with format defined MQSTR


Vitor wrote:
So what's wrong with using the CopyEntireMessage supplied procedure and setting up the MQMD? What about that result is wrong for you?

Indeed, why are you using ESQL for this anyway? What's wrong with:

Code:

SOAPInput -> MQHeader -> MQOutput 

_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Dec 22, 2015 9:03 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.

Halloween wrote:
Yes but i need that XML String as a text format on MQ Output with format defined MQSTR


Have you tried what has been suggested?
If so, what was the result?
Were there any errors? If so please tell us.
_________________
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
Halloween
PostPosted: Tue Dec 22, 2015 11:07 am    Post subject: Reply with quote

Acolyte

Joined: 11 Mar 2015
Posts: 60

Hello smdavies,

If it try the SOAPInput-> MQHeader ->MQOutput.

The result i get is XML with MQSTR format
I am trying to fetch the details as text not XML
Back to top
View user's profile Send private message
Halloween
PostPosted: Tue Dec 22, 2015 11:10 am    Post subject: Reply with quote

Acolyte

Joined: 11 Mar 2015
Posts: 60

I had been telling that i would need this xMLstring between <in0>..</in0>

Code:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:ProcessMessage">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:processMessage>
         <in0><![CDATA[<advance-person-data xmlns="http://www.bmw.com/BWMS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bmw.com/BWMS /ed/advance.xsd">
  <header>
    <sender>Siebel</sender>
    <receiver>BWMS</receiver>
    <case-id />
    <crm-number>1530800001</crm-number>
    <order-number>3756551</order-number>
    <time-stamp>20151117091518</time-stamp>
  </header>
  <body>
    <language>en</language>
    <companions-number-of>0</companions-number-of>
    <children-number-of>0</children-number-of>
    <young-persons-number-of>0</young-persons-number-of>
  </body>
</advance-person-data>
]]>       </in0>
      </urn:processMessage>
   </soapenv:Body>
</soapenv:Envelope>


I want this string as text form and format defined as MQSTR![/b]
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Dec 22, 2015 11:16 am    Post subject: Reply with quote

Grand High Poobah

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

Halloween wrote:
I had been telling that i would need this xMLstring between <in0>..</in0>


And at exactly what point in this thread did you say, mention or intimate that the string in question was in a CDATA section?

Halloween wrote:

I want this string as text form and format defined as MQSTR


And again I ask what made you think that the MRM domain was any way to achieve that?

Halloween wrote:

If it try the SOAPInput-> MQHeader ->MQOutput.

The result i get is XML with MQSTR format
I am trying to fetch the details as text not XML


Is this some kind of inept way of saying that you get the details as a string in a CDATA section? Because XML is just text, isn't it? So saying you get the details as text not XML is tautological.

So tell us, very clearly, what you mean by text not XML, and why you feel you need any of the text domains rather than the XML one.
_________________
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 Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » MQSTR
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.