Author |
Message
|
rajbuddha |
Posted: Fri Oct 30, 2015 12:50 pm Post subject: Rest Service Invocation using Request Node |
|
|
 Apprentice
Joined: 02 Aug 2011 Posts: 47 Location: chennai
|
Hello Team ,
I am using IIB9.0.0.3 with MQ7.5 in my enterprise .
I have a usecase for calling workday Rest API report service using IIB .
So far for connecting workday (HR Management system) we have used SOAPRequest nodes , As this is different from others I need to populate specific URL each time to invoke this rest service .
I understand ( from some MQseries posts and other google posts ) that we have to use HTTPRequest node for rest not soapRequest node .
I am able to create a flow with
HttpInput Node --> --> Compute Node HTTPRequestNode--> HttpReply Node .
In the compute node I am setting LocalEnvironment related data like proxy , method , etc .
I am sending input data using HTTPRest client util (Mozilla plug-In) and when I see in debug mode I see I am pulling data from WorkDay restApi service but I see Unknown parser followed by BLOB data , However I see the correct XML report showing in RestClient Util as response after debug went to HTTPReply node . I am not sure where this BLOB to XML conversion is taking place in RestClient or HTTPReply ( I do not this in HTTPReply node as I see same unknown parser even after out terminal of httpReply node ).
When I try specifying XMLNS, XMLNSC parcers in the HTTPRequest node for response node ResponseMessageParsing section I still see the same unknownparser name error .
When I try to add compute node after HTTPRequest node out terminal and try converting BLOB to CHAR or XMLNSC I am getting error Unable to convert .
However when I just enter the require URL in any browser I am able to see XML response given as result (Without IIB Involvement ).
Please let me know your thoughts on this .
I have been talking to workday team and see to modify their response before sending but they have very less options to modify itseems . _________________ -----------
Raju Buddha
Never Wait for your 2nd Opportunity..!Becoz it may be harder than the 1st One... |
|
Back to top |
|
 |
timber |
Posted: Mon Nov 02, 2015 1:54 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Quote: |
I see Unknown parser followed by BLOB data |
Please post the actual text of the error message. |
|
Back to top |
|
 |
rajbuddha |
Posted: Mon Nov 02, 2015 7:09 am Post subject: Rest Service Invocation using Request Node |
|
|
 Apprentice
Joined: 02 Aug 2011 Posts: 47 Location: chennai
|
Hi timber ,
Thanks for your reply .There is no error except it says unknown parser .
Here is how it looks like immediately after HTTPRequestNode
Message --> After HTTPResponseHeader and BLOB (which has Unknown Parser Name as first child and BLOB data as next child ) .
When I have an ESQL compute node after HTTPRequest node to convert HTTPResponse I am getting below error during blob to cast conversion
Code used :
DECLARE loadedEmailReportBlob1 CHAR CAST(InputRoot.BLOB.BLOB AS CHAR CCSID 1208);
Error :
Line:INTEGER:583
Function:CHARACTER:ImbConverterCPP::internalToUnicode
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2135
Text:CHARACTER:Unconvertable character
Insert
Type:INTEGER:5
Text:CHARACTER:8b
Please advise _________________ -----------
Raju Buddha
Never Wait for your 2nd Opportunity..!Becoz it may be harder than the 1st One... |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Nov 02, 2015 7:26 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
I can't see anything in your post that even hints of 'Unknown Parser'.
I can see a possible character (i.e. Data) problem but that might be a red-herring. _________________ 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 |
|
 |
rajbuddha |
Posted: Mon Nov 02, 2015 8:16 am Post subject: Rest Service Invocation using Request Node |
|
|
 Apprentice
Joined: 02 Aug 2011 Posts: 47 Location: chennai
|
Hi smdavies99 ,
As I stated , this UnknownParserName is the first child of Root.BLOB immediately of HTTPRequestNode out terminal .
Below error is during conversion in ESQL .
I do not see this as Data Issue as I get proper xml response given by Rest service when I use Mozilla or Iexplorer browsers .
Please let me know for any more info you are looking for _________________ -----------
Raju Buddha
Never Wait for your 2nd Opportunity..!Becoz it may be harder than the 1st One... |
|
Back to top |
|
 |
Vitor |
Posted: Mon Nov 02, 2015 8:26 am Post subject: Re: Rest Service Invocation using Request Node |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
rajbuddha wrote: |
As I stated , this UnknownParserName is the first child of Root.BLOB immediately of HTTPRequestNode out terminal . |
This is a clue. IIBv9 is not recognizing the HTTP headers that precede the message body.
rajbuddha wrote: |
Below error is during conversion in ESQL . |
So if you use a Compute node to force the issue and try to manually parse the payload you get an unconvertible character? Not entirely surprising.
rajbuddha wrote: |
I do not see this as Data Issue as I get proper xml response given by Rest service when I use Mozilla or Iexplorer browsers . |
So using these tools (which simply display the output) you get something that look to the human eye like XML? All that proves is that there's XML in the response, not that the response is what's expected.
You also need to explain why this REST service is using XML rather than the more usual JSON. You also need to explain more clearly why this needs an HTTPRequest node not a SOAPRequest node just because the URL is variable. Because:
rajbuddha wrote: |
I understand ( from some MQseries posts and other google posts ) that we have to use HTTPRequest node for rest not soapRequest node . |
That's because the SOAP nodes don't speak JSON and are built around the WS formats. I'm somewhat skeptical that whoever wrote your HR Management system using standard web services for everything:
rajbuddha wrote: |
So far for connecting workday (HR Management system) we have used SOAPRequest nodes |
decided to abandon this standard for one service but didn't go the whole way and stayed with XML not JSON.
I don't believe this endpoint is as REST as you think it is. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
rajbuddha |
Posted: Mon Nov 02, 2015 8:58 am Post subject: Re: Rest Service Invocation using Request Node |
|
|
 Apprentice
Joined: 02 Aug 2011 Posts: 47 Location: chennai
|
Hi Vitor ,
thanks for your highlighted points .
Below are factors which were reasons for my assumptions
This is a clue. IIBv9 is not recognizing the HTTP headers that precede the message body.
--> I see HTTPResponse header with 200 response code . And IF I do not force conversion and have just HttpReply node I see response displayed as XML in the RestClient of Mozilla , Does it means Mozilla is auto formatting and displaying correctly ?
--> Also when I enter full URL including input fields in it , I get XML response . I tried sending JSON input and also parsing HTTPResponse as Json .
--> Also with the same SOAP setup I do not see getting any response , Instead I am getting 407 Proxy auth error .
I am clue less here .
Here is HTTPResponse header:
HTTPResponseHeader
X-Original-HTTP-Status-Line:CHARACTER:HTTP/1.1 200 OK
X-Original-HTTP-Status-Code:INTEGER:200
Server:CHARACTER:Workday Integration Server /2015.44.864
X-Workday-Forwarded-For:CHARACTER:205.128.224.6
X-WD-REQUEST-ID:CHARACTER:F5S|F0343A58|563795E7
connection:CHARACTER:close
Host:CHARACTER:wd5-impl-services1.workday.com
accept-language:CHARACTER:null
Content-Encoding:CHARACTER:gzip
Cookie:CHARACTER:WorkdayLB=20132618.1835.0000
accept-encoding:CHARACTER:gzip, deflate
Content-Type:CHARACTER:text/xml;charset=UTF-8
Date:CHARACTER:Mon, 02 Nov 2015 16:57:16 GMT
Strict-Transport-Security:CHARACTER:max-age=15638400; includeSubDomains
I am sending HTTPRequest Header as
HTTPRequestHeader
Content-Type:CHARACTER:text/xml;charset=UTF-16
Anything else I should add in header to expect correct formatted data ? . _________________ -----------
Raju Buddha
Never Wait for your 2nd Opportunity..!Becoz it may be harder than the 1st One... |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Nov 02, 2015 9:13 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Quote: |
Content-Encoding:CHARACTER:gzip
Content-Type:CHARACTER:text/xml;charset=UTF-8 |
You probably need to do something useful to decompress the gzip data before you can treat it as character data... _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Vitor |
Posted: Mon Nov 02, 2015 9:49 am Post subject: Re: Rest Service Invocation using Request Node |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
rajbuddha wrote: |
Does it means Mozilla is auto formatting and displaying correctly ? |
I think Mozilla does a lot less parsing and processing of the response than IIB, and tends to treat data as characters to be displayed rather than data to be parsed and processed.
rajbuddha wrote: |
--> Also when I enter full URL including input fields in it , I get XML response . I tried sending JSON input and also parsing HTTPResponse as Json . |
Why are you "trying"? Is the endpoint WS XML or REST JSON? What do the people who own it say it is?
There's no point randomly "trying" things to see if you can hit the magic combination. Think, theorize, experiment, review.
rajbuddha wrote: |
--> Also with the same SOAP setup I do not see getting any response , Instead I am getting 407 Proxy auth error . |
So you're asserting that making an HTTP link with an HTTPRequest node uses a different connection protocol than an HTTP link with a SOAPRequest node and this is causing the SOAP node to require a proxy?
I repeat my earlier comments about this not being the endpoint you think it is.
rajbuddha wrote: |
I am clue less here . |
I decline to comment in the face of temptation.
rajbuddha wrote: |
Here is HTTPResponse header:
Code: |
HTTPResponseHeader
X-Original-HTTP-Status-Line:CHARACTER:HTTP/1.1 200 OK
X-Original-HTTP-Status-Code:INTEGER:200
Server:CHARACTER:Workday Integration Server /2015.44.864
X-Workday-Forwarded-For:CHARACTER:205.128.224.6
X-WD-REQUEST-ID:CHARACTER:F5S|F0343A58|563795E7
connection:CHARACTER:close
Host:CHARACTER:wd5-impl-services1.workday.com
accept-language:CHARACTER:null
Content-Encoding:CHARACTER:gzip
Cookie:CHARACTER:WorkdayLB=20132618.1835.0000
accept-encoding:CHARACTER:gzip, deflate
Content-Type:CHARACTER:text/xml;charset=UTF-8
Date:CHARACTER:Mon, 02 Nov 2015 16:57:16 GMT
Strict-Transport-Security:CHARACTER:max-age=15638400; includeSubDomains
|
|
I agree with my most worthy associate. This is the first time you've mentioned gzip content.
I also point out you've not answered my other questions in the earlier post, specifically why the SOAP node can't handle variable URLs. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
joebuckeye |
Posted: Mon Nov 02, 2015 11:06 am Post subject: Re: Rest Service Invocation using Request Node |
|
|
 Partisan
Joined: 24 Aug 2007 Posts: 365 Location: Columbus, OH
|
Vitor wrote: |
You also need to explain why this REST service is using XML rather than the more usual JSON. |
I see REST/XML sometimes. I think it is a baby step on the way to the typical REST/JSON format. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Nov 02, 2015 11:12 am Post subject: Re: Rest Service Invocation using Request Node |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
joebuckeye wrote: |
Vitor wrote: |
You also need to explain why this REST service is using XML rather than the more usual JSON. |
I see REST/XML sometimes. I think it is a baby step on the way to the typical REST/JSON format. |
I'm still interested in the OP's claim that SOAP nodes require a proxy for a given connection that the HTTP nodes do not.
Or that you can't use specific URLs in SOAP nodes, which I take to mean the parameterized URLs common in REST services. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
joebuckeye |
Posted: Mon Nov 02, 2015 11:54 am Post subject: Re: Rest Service Invocation using Request Node |
|
|
 Partisan
Joined: 24 Aug 2007 Posts: 365 Location: Columbus, OH
|
Vitor wrote: |
joebuckeye wrote: |
Vitor wrote: |
You also need to explain why this REST service is using XML rather than the more usual JSON. |
I see REST/XML sometimes. I think it is a baby step on the way to the typical REST/JSON format. |
I'm still interested in the OP's claim that SOAP nodes require a proxy for a given connection that the HTTP nodes do not.
Or that you can't use specific URLs in SOAP nodes, which I take to mean the parameterized URLs common in REST services. |
Yeah, those claims seem off to me.
I know we sometimes use an Environment Subflow that passes back the environment the current flow is running in which allows a following node to set the destination URL for the target SOAP or HTTP node.
The proxy issue sounds to me like the comparison is not being done against the same things (outside of a SOAP or HTTP node difference). |
|
Back to top |
|
 |
Vitor |
Posted: Mon Nov 02, 2015 12:05 pm Post subject: Re: Rest Service Invocation using Request Node |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
joebuckeye wrote: |
I know we sometimes use an Environment Subflow that passes back the environment the current flow is running in which allows a following node to set the destination URL for the target SOAP or HTTP node. |
It's a valid solution
Better than selecting the desired outcome from:
Select No to 2 and Yes to 3 for Yes;
Select Yes to 2 and No to 3 for No But Yes To Other Things;
Select No to 2 and No to 3 for No;
Select Yes to 2 and Yes to 3 for Yes But I Sort Of Mean No Kinda
Select Yes to any even number for as good a choice as any (and you hate animals);
Select any non-Euclidian coordinate for randomly located outcomes;
Select any number if you just don't understand the ballot at all; _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Nov 03, 2015 12:01 am Post subject: Re: Rest Service Invocation using Request Node |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Vitor wrote: |
Better than selecting the desired outcome from:
Select No to 2 and Yes to 3 for Yes;
Select Yes to 2 and No to 3 for No But Yes To Other Things;
Select No to 2 and No to 3 for No;
Select Yes to 2 and Yes to 3 for Yes But I Sort Of Mean No Kinda
Select Yes to any even number for as good a choice as any (and you hate animals);
Select any non-Euclidian coordinate for randomly located outcomes;
Select any number if you just don't understand the ballot at all; |
Or ...
Yes but no but yes but no
https://www.youtube.com/watch?v=zExc6SK4kpA
 _________________ 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 |
|
 |
mqjeff |
Posted: Tue Nov 03, 2015 6:54 am Post subject: Re: Rest Service Invocation using Request Node |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
smdavies99 wrote: |
Vitor wrote: |
Better than selecting the desired outcome from:
Select No to 2 and Yes to 3 for Yes;
Select Yes to 2 and No to 3 for No But Yes To Other Things;
Select No to 2 and No to 3 for No;
Select Yes to 2 and Yes to 3 for Yes But I Sort Of Mean No Kinda
Select Yes to any even number for as good a choice as any (and you hate animals);
Select any non-Euclidian coordinate for randomly located outcomes;
Select any number if you just don't understand the ballot at all; |
Or ...
Yes but no but yes but no
https://www.youtube.com/watch?v=zExc6SK4kpA
 |
Where's the box for quantum superposition maybe? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
|