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 » Workflow Engines - IBM MQ Workflow & Business Process Choreographer » Passing XML as part of the Input Data

Post new topic  Reply to topic
 Passing XML as part of the Input Data « View previous topic :: View next topic » 
Author Message
belka
PostPosted: Thu Jul 29, 2004 8:06 am    Post subject: Passing XML as part of the Input Data Reply with quote

Novice

Joined: 16 Jun 2004
Posts: 17

We are using WMQI to create a message and send it the workflow to start the process.

i have an input container defined for the message structure. we would like to use one of the fields in the container to store the original message (pre-WMQI).

workflow complains that xml data in the field needs to be part of the data container. is there a way around it? how can i store xml data in one of the data container fields?

thanks.
_________________
-belka
Back to top
View user's profile Send private message MSN Messenger
jmac
PostPosted: Thu Jul 29, 2004 12:40 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Jun 2001
Posts: 3081
Location: EmeriCon, LLC

Convert the xml data to a hexadecimal string and that should work
_________________
John McDonald
RETIRED
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
JLRowe
PostPosted: Fri Jul 30, 2004 9:52 am    Post subject: Reply with quote

Yatiri

Joined: 25 May 2002
Posts: 664
Location: South East London

or put it in a !CDATA
Back to top
View user's profile Send private message Send e-mail
belka
PostPosted: Mon Aug 02, 2004 9:50 am    Post subject: Reply with quote

Novice

Joined: 16 Jun 2004
Posts: 17

CDATA works, but it strips out all of the XML tags inside.
i haven't tried converting to hex.
_________________
-belka
Back to top
View user's profile Send private message MSN Messenger
jmac
PostPosted: Mon Aug 02, 2004 10:00 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Jun 2001
Posts: 3081
Location: EmeriCon, LLC

belka:

Hex will work, this is what MQWF does with xml messages it wishes to return to you when you get an error.
_________________
John McDonald
RETIRED
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
belka
PostPosted: Mon Aug 02, 2004 10:38 am    Post subject: Reply with quote

Novice

Joined: 16 Jun 2004
Posts: 17

john,

i'm totally confused by your last response.

this is what a sample message looks like. text in red will be the original message received by WMQI that couldn'tl be processed.

you're saying convert just that part to hex or the whole message? do you have an example?

<ProcessTemplateCreateAndStartInstance>
<ProcTemplName>ErrorManagementFlow</ProcTemplName>
<ProcInstName>NORDICS_GL003_54278</ProcInstName>
<KeepName>true</KeepName>
<ProcInstInputData>
<StandardError>
<Id>54279</Id>
<SourceSystemId>GL</SourceSystemId>
<SourceRegion>SWEDEN</SourceRegion>
<SourceData>
<test>some test message</test>
<test2>
<test3>another message</test3>
</test2>

</SourceData>
<SourceType>WORKSITE</SourceType>
<ErrorDetails>
<Id>123L</Id>
<Description>IFS company ID not found in GIS lookup table. GAIPS WBI processes requires this value to complete the transaction.</Description>
<AdditionalDetails>Please verify that IFS Company ID is valid, then contact support to update GAIPS process.</AdditionalDetails>
<Data>IFS Company ID = 07</Data>
</ErrorDetails>
<ErrorDetails/>
</StandardError>
</ProcInstInputData>
</ProcessTemplateCreateAndStartInstance>
_________________
-belka
Back to top
View user's profile Send private message MSN Messenger
jmac
PostPosted: Mon Aug 02, 2004 10:49 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Jun 2001
Posts: 3081
Location: EmeriCon, LLC

Belka:

Here is a ProcessTemplateCreateAndStartInstanceResponse message generated by MQWF. The tag RequestAsHexString contains the original create and start instance XML message that was sent to MQWF.

I hope this clears up the confusion... sorry

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<WfMessage>
 <WfMessageHeader>
  <ResponseRequired>No</ResponseRequired>
 </WfMessageHeader>
 <ProcessTemplateCreateAndStartInstanceResponse>
  <Exception>
   <Rc>121</Rc>
   <Parameters>       </Parameters>
   <MessageText>FMC00121E Name is not unique </MessageText>
   <Origin>e:\v340\src\fmcecosa.cxx(3922)</Origin>
  </Exception>  <RequestAsHexString>3C3F786D6C2076657273696F6E3D22312E3022206...</RequestAsHexString>
 </ProcessTemplateCreateAndStartInstanceResponse>
</WfMessage

_________________
John McDonald
RETIRED
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
belka
PostPosted: Mon Aug 02, 2004 12:34 pm    Post subject: Reply with quote

Novice

Joined: 16 Jun 2004
Posts: 17

it worked. is there an API to convert the string from hex to ansi
_________________
-belka
Back to top
View user's profile Send private message MSN Messenger
jmac
PostPosted: Mon Aug 02, 2004 12:47 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Jun 2001
Posts: 3081
Location: EmeriCon, LLC

If there is I don't know about it... If you find one let me know. I had to write some code to do the translation.
_________________
John McDonald
RETIRED
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
belka
PostPosted: Tue Aug 03, 2004 6:28 am    Post subject: [SOLVED]Passing XML as part of the Input Data Reply with quote

Novice

Joined: 16 Jun 2004
Posts: 17

ok. had to write my own conversion function. for anybody that cares, here is the code.

public String getHexMember(RequestContext context, ReadOnlyContainer input, String name)
{
String val = null;
StringBuffer buffer = new StringBuffer();

try {
val = context.getMemberValue(input, name, "");

for (int i=0; i<val.length(); i += 2) {
buffer.append( (char)Integer.parseInt(val.substring(i, i+2),16) );
}
}
catch (Exception e) {
}

return buffer.toString();
}

_________________
-belka
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Workflow Engines - IBM MQ Workflow & Business Process Choreographer » Passing XML as part of the Input Data
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.