Author |
Message
|
nikhilsawant097 |
Posted: Wed May 30, 2018 3:03 am Post subject: XML to JSON in response |
|
|
Newbie
Joined: 24 May 2018 Posts: 6
|
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 |
|
 |
timber |
Posted: Wed May 30, 2018 3:24 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Looks as if you are sending a JSON message tree to a SOAPReply node.
What did you mean to do? |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed May 30, 2018 3:24 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 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 |
|
 |
nikhilsawant097 |
Posted: Fri Jun 01, 2018 8:32 pm Post subject: |
|
|
Newbie
Joined: 24 May 2018 Posts: 6
|
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 |
|
 |
nikhilsawant097 |
Posted: Fri Jun 01, 2018 9:25 pm Post subject: |
|
|
Newbie
Joined: 24 May 2018 Posts: 6
|
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 |
|
 |
timber |
Posted: Mon Jun 04, 2018 1:55 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Please describe your message flow, and tell us what it is trying to do (in high-level terms). |
|
Back to top |
|
 |
abhi_thri |
Posted: Mon Jun 04, 2018 2:14 am Post subject: |
|
|
 Knight
Joined: 17 Jul 2017 Posts: 516 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 |
|
 |
|