Author |
Message
|
meena05 |
Posted: Wed Mar 02, 2016 9:39 am Post subject: SOAP Input - SOAP Request - Fan IN Fan OUT |
|
|
Apprentice
Joined: 26 Feb 2016 Posts: 39
|
I have a SOAP Input request which has multiple ID's coming in single request.
I have to call a Provider service by passing one ID at a time.
Get all the responses together, evaluate and then send one SOAP reply
Can you please advise me the approach |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Mar 02, 2016 9:53 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Refer to the samples. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
ruimadaleno |
Posted: Thu Mar 03, 2016 1:40 am Post subject: |
|
|
Master
Joined: 08 May 2014 Posts: 274
|
Aggregator/collector nodes ... _________________ Best regards
Rui Madaleno |
|
Back to top |
|
 |
meena05 |
Posted: Mon Mar 07, 2016 11:36 am Post subject: UDP variables |
|
|
Apprentice
Joined: 26 Feb 2016 Posts: 39
|
Thanks for your reply.
I need help with UDP variables.
I have variables defined in Properties file.
MESSAGE.COUNT = 5
Message1
Message1.TYPE
Message2
Message2.TYPE
Message3
Message3.TYPE
Message4
Message4.TYPE
Message5
Message5.TYPE
I have defined them as UDP variables. In order to access the values in ESQL. I have iterated variable "i" over MESSAGE.COUNT to get the values 1, 2, 3, 4 and 5.
and retrieving value suing following way
FIELDVALUE('Message' || i || '.TYPE')
This is throwing operand '||' error while deployment. Can you direct me to the correct way of handling this. Thank you! |
|
Back to top |
|
 |
timber |
Posted: Mon Mar 07, 2016 12:20 pm Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
I could tell you what is wrong with your ESQL, but I do not want to help you with implementing the wrong solution. Please can you explain why using a properties file is the correct technical solution to your problem? |
|
Back to top |
|
 |
meena05 |
Posted: Mon Mar 07, 2016 12:26 pm Post subject: |
|
|
Apprentice
Joined: 26 Feb 2016 Posts: 39
|
Thanks for your reply!
These Message Type count is not fixed. User may add few more types to it in which case they do not want a code change but want the new messages to be picked dynamically.
Using UDP, tough they add new messages into properties still I need code change to add the UDP values. I know my solution is not good.
Can you please advise. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Mar 07, 2016 12:32 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
If the message type changes, does the structure and contents of the message change?
Doesn't that mean you have to change the code to handle the new message format?
OR at least change the model you are using to understand the message? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
meena05 |
Posted: Mon Mar 07, 2016 12:50 pm Post subject: |
|
|
Apprentice
Joined: 26 Feb 2016 Posts: 39
|
Sorry for the confusion, the message type does not change. I will have to prepare my output based on below static (hardcoded) input values. These static values may increment in future.
COUNT = 5
MESSAGE1.TYPE = 'message1'
MESSAGE1.NAME = 'name1'
MESSAGE1.AMOUNT = '123'
MESSAGE2.TYPE = 'message2'
MESSAGE2.NAME = 'name2'
MESSAGE2.AMOUNT = '123'
MESSAGE3.TYPE = 'message3'
MESSAGE3.NAME = 'name3'
MESSAGE3.AMOUNT = '123'
MESSAGE4.TYPE = 'message4'
MESSAGE4.NAME = 'name4'
MESSAGE4.AMOUNT = '123'
MESSAGE5.TYPE = 'message5'
MESSAGE5.NAME = 'name5'
MESSAGE5.AMOUNT = '123' |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Mar 07, 2016 12:55 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Ok.
Again.
Does message1 have a different structure than message2? Or is it the same structure?
You need to spend some time with the team figuring out exactly what "without changing code" means, and where it can really be avoided or where it can't be avoided at all.
Once you've really nailed all of that down, you can go back to trying to solve your code problem. Which is easiest and quickest done by using the tracing and other debugging functions of Broker, rather than asking us for help. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
meena05 |
Posted: Tue Mar 08, 2016 2:22 pm Post subject: |
|
|
Apprentice
Joined: 26 Feb 2016 Posts: 39
|
It has same structure. I am not able to iterate on External variables and get the desired value. Any Suggestions? |
|
Back to top |
|
 |
maurito |
Posted: Wed Mar 09, 2016 12:28 am Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
meena05 wrote: |
It has same structure. I am not able to iterate on External variables and get the desired value. Any Suggestions? |
you can define 3 UDPs:
Code: |
TYPE = message1,message2,message3,et
NAME = name1,name2,name3,etc
AMOUNT = 1,4,5,6,etc
|
then define in DFDL 3 csv message models to parse each udp ( only one unbounded element in each, separated by commas. )
Then , TYPE[n] will correspond to NAME[n] and AMOUNT[n]
Having said that, I would also like to say that it probably is NOT the best design.
You have not stated what problem you are trying to solve and why you decided to use UDPs. |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Mar 09, 2016 2:20 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
maurito wrote: |
You have not stated what problem you are trying to solve and why you decided to use UDPs. |
Perhaps 'an architect' told the OP that was the way to do it. We have ween this many times before on this forum where someone with only a scant understanding of the product is directing developers and their instructions just lead them into all sorts of problems.
Not saying that is the case here but past evidence does lead me to think that. _________________ 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 |
|
 |
meena05 |
Posted: Wed Mar 09, 2016 5:53 am Post subject: |
|
|
Apprentice
Joined: 26 Feb 2016 Posts: 39
|
Thank you maurito and smdavies99.
This is a web service.
Do we have any other way other than UDP. like reading these from a xml file. Please advise |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Mar 09, 2016 5:56 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
meena05 wrote: |
Thank you maurito and smdavies99.
This is a web service.
Do we have any other way other than UDP. like reading these from a xml file. Please advise |
Using an XML file is a worse idea than using UDPs.
Certainly code can be written to do it.
A database might be a better idea.
Or a global cache, with some separate flow that loads it. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
meena05 |
Posted: Wed Mar 09, 2016 6:00 am Post subject: |
|
|
Apprentice
Joined: 26 Feb 2016 Posts: 39
|
Thank you Jeff. Here we are trying to migrate a WESB module to IIB.
WESB has a custom java method to read all these values from a properties files. Where in any changes in properties can be made without change in WESB code.
I started to implement this in IIB with UDP values and LIST variables.
Hope I am going in right direction!  |
|
Back to top |
|
 |
|