Hi Everyone,

Is it possible to configure a RESTful service subroutine to accept XML as the 
input to one of its defined parameters?

I keep getting the following error:
500: Expected+a+','+or+'}'com.rs.u2.u2rest.marshaller.U2JSONTokenizer@13c33b7

The subroutine has 2 parameters XML.IN in Position 1 and XML.OUT in Position 2. 
Each type is set to string.

Normally this program is used elsewhere in our other services so it is already 
XML ready.

I've converted my test xml to json and tried that. While the error disappears 
the response while valid xml (output from the program) is otherwise empty. (I 
changed the type from string to json too).

If I key in any random string I get the same valid yet empty program response.

So how do I configure the server to pass this xml string straight to the 
subroutine?
Perhaps I need to convert some of the characters (e.g. '/' in the xml below as 
per uri requirements?
Is it possible or am I way off course here?

Sample xml:
<code>
<batchRequests><BatchRequest><referenceNumber>f549c4dd-01f4-4b9b-99e2-6dd6862cf364</referenceNumber><serviceRequest><SERVICE
 
name="VALID.POST.CODE"><PORTAL_USER_ID>testuser</PORTAL_USER_ID><POSTCODE>4300</POSTCODE><SUBURB>GOODNA</SUBURB></SERVICE></serviceRequest></BatchRequest></batchRequests>
</code>

Converted to json:
<code>
{"batchRequests": {"BatchRequest": {"referenceNumber": 
"f549c4dd-01f4-4b9b-99e2-6dd6862cf364","serviceRequest": {"SERVICE": 
{"-name":"VALID.POST.CODE","PORTAL_USER_ID": "testuser","POSTCODE": 
"4300","SUBURB": "GOODNA"}}}}}
</code>

Many thanks in advance.
Cheers
Peter




[Description: Description: 
https://www.firstmac.com.au]<http://www.firstmac.com.au/>

Peter Cheney

Universe Engineer

t 07 3017 8837 | f 07 3002 8400

e [email protected]<mailto:[email protected]> | w 
www.firstmac.com.au<https://www.www.firstmac.com.au/>



 -------------------------------------------------------------------------------
Note: 
This email (inc all attachments) is for the use of the intended recipient(s) 
only.
Privileged or confidential information may be contained in this communication. 
If you have received this email in error, please notify the sender immediately 
and then delete all copies of this message from your computer network. If you 
are not the intended recipient, you must not keep, use, disclose, copy or 
distribute this email without the author's prior permission. If you are the 
intended recipient and you do not wish to receive similar electronic messages 
from us in future, then please respond to the sender to this effect. 
We have taken precautions to minimise the risk of transmitting software 
viruses, but advise you to carry out your own virus checks on this email and 
its attachments. We do not accept liability for any loss or damage caused by 
software viruses and do not represent that this transmission is free from 
viruses or other defects. 
Firstmac Limited (ABN 59 094 145 963) (AFSL 290600) 
 -------------------------------------------------------------------------------
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to