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 IndexWebSphere Message Broker SupportXML to JSON in response

Post new topicReply to topic
XML to JSON in response View previous topic :: View next topic
Author Message
nikhilsawant097
PostPosted: Wed May 30, 2018 3:03 am Post subject: XML to JSON in response Reply with quote

Newbie

Joined: 24 May 2018
Posts: 4

HI,

Sorry for any non-technical terms, I'm totally new in this.
I have a reponse in XML and want convert in JSON.

I have used (in the main function),
Code:
SET OutputRoot.JSON.Data = InputBody;



Which gives in erorr,
<Function>ImbSOAPReplyHelper::makeSOAPReply</Function>

Error Making JNI Call: method_com_ibm_broker_axis2_Axis2Invoker_prepareToSendReplyNonSOAP

<Insert>
<Type>5</Type>
<Text>method_com_ibm_broker_axis2_Axis2Invoker_prepareToSendReplyNonSOAP</Text>
</Insert>
Back to top
View user's profile Send private message
timber
PostPosted: Wed May 30, 2018 3:24 am Post subject: Reply with quote

Sentinel

Joined: 25 Aug 2015
Posts: 817

Looks as if you are sending a JSON message tree to a SOAPReply node.
What did you mean to do?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed May 30, 2018 3:24 am Post subject: Reply with quote

Grand Poobah

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

looks like the original response was SOAP?
May be you need to add a SOAPExtract node in between?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
nikhilsawant097
PostPosted: Fri Jun 01, 2018 8:32 pm Post subject: Reply with quote

Newbie

Joined: 24 May 2018
Posts: 4

fjb_saper wrote:
looks like the original response was SOAP?
May be you need to add a SOAPExtract node in between?



Yes the original response is SOAP.

Can you help me with SOAPExtract node. I'm totally a Noob in this.

Instead I have used ResetContentDescriptor and set its Message Domain as JSON but nothing works.

Now i'll try with SOAPExtract.


Last edited by nikhilsawant097 on Fri Jun 01, 2018 11:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
nikhilsawant097
PostPosted: Fri Jun 01, 2018 9:25 pm Post subject: Reply with quote

Newbie

Joined: 24 May 2018
Posts: 4

Because it is giving Exception, saying Invalid SOAP.

I have used SOAPInput proceed by HTTPRequest, because SOAPRequest was not working with my URL.



Code:
<exceptionList>
<RecoverableException>
<File>F:\build\S1000_slot1\S1000_P\src\DataFlowEngine\MessageServices\ImbDataFlowNode.cpp</File>
<Line>1251</Line>
<Function>ImbDataFlowNode::createExceptionList</Function>
<Type>ComIbmSOAPExtractNode</Type>
<Name>signFlow2#FCMComposite_1_1</Name>
<Label>signFlow2.SOAP Extract</Label>
<Catalog>BIPmsgs</Catalog>
<Severity>3</Severity>
<Number>2230</Number>
<Text>Node throwing exception</Text>
<Insert>
<Type>14</Type>
<Text>signFlow2.SOAP Extract</Text>
</Insert>
<RecoverableException>
<File>SoapExtractNode.java</File>
<Line>360</Line>
<Function>removeSOAPEnvelope</Function>
<Type/>
<Name/>
<Label/>
<Catalog>BIPmsgs</Catalog>
<Severity>3</Severity>
<Number>3170</Number>
<Text>Invalid Soap</Text>
<Insert>
<Type>5</Type>
<Text>SOAP Extract</Text>
</Insert>
</RecoverableException>
</RecoverableException>
</exceptionList>
Back to top
View user's profile Send private message
timber
PostPosted: Mon Jun 04, 2018 1:55 am Post subject: Reply with quote

Sentinel

Joined: 25 Aug 2015
Posts: 817

Please describe your message flow, and tell us what it is trying to do (in high-level terms).
Back to top
View user's profile Send private message
abhi_thri
PostPosted: Mon Jun 04, 2018 2:14 am Post subject: Reply with quote

Master

Joined: 17 Jul 2017
Posts: 200
Location: UK

nikhilsawant097 wrote:
Because it is giving Exception, saying Invalid SOAP.

I have used SOAPInput proceed by HTTPRequest, because SOAPRequest was not working with my URL.


You can only use SOAPExtract where you receive the response from a webservice in SOAP format, i.e wehn you've used SOAPRequest node to make the webservice call which is not what you've done in your flow. Your flow is using HTTPRequest node and I suppose it receives a non-SOAP xml as the webservice response?

nikhilsawant097 wrote:
SET OutputRoot.JSON.Data = InputBody;


If you are expecting to map an XML to JSON via the above statement it will not work...you need to map the XML fields (via ESQL, Mapping node etc) to the corresponding JSON fields to generate a JSON message. Please refer to infocenter for more details.

PS: If you are new to IIB it is worth attending the IIB Developer 5 day IBM workshop to improve your understanding of the product.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportXML to JSON in response
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.