Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Found character data inside an array element while deserializing

Hello,
I have 2 problems with a job. We want to use a job as a webservice (including a context param).
1) We build the job following the manual instructions :
Build type : Axis Webservice (WAR)
When we deploy the war file, our webservice is unknown, so we had these lines in the server-config.wsdd :
<service name="PAQ_Job_Test_Webservices" style="java:RPC">
<parameter name="className" value="crb.paq_job_test_webservices_0_1.PAQ_Job_Test_Webservices"/>
<parameter name="allowedMethods" value="*"/>
</service>
It's now OK
2) When we call the job thanks a browser with this URL :
http://localhost:8080/PAQ_Job_Test_Webservices_0.1/services/PAQ_Job_Test_Webservices?method=runJob&arg0=-param_context VAR_IHM_TASKID=1
we have an error message :
<?xml version="1.0" encoding="UTF-8" ?>
- <soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd=" http://www.w3.org/2001/XMLSchema" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance">
- <soapenv:Body>
- <soapenv:Fault>
<faultcode>soapenv 0683p000009M9p6.pngerver.userException</faultcode>
<faultstring>org.xml.sax.SAXException: Found character data inside an array element while deserializing</faultstring>
- <detail>
<ns1:hostname xmlns:ns1=" http://xml.apache.org/axis/">CZC31336QS</ns1:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
When we call the job thanks a browser with this URL : http://localhost:8080/PAQ_Job_Test_Webservices_0.1/services/PAQ_Job_Test_Webservices?method=runJob&arg0=
Our job is OK, but we need a context param when we call the webservice
* Our developpement environnement is :
- TOS 5.4.0 (C:\Program Files (x86)\TOS_DI-r110020-V5.4.0\TOS_DI-win32-x86.exe)
- JDK : 1.6
- Java : jre7
- Apache Tomcat 6.0.37 (for a local deployment)
- Browser : I.E 8
* We develop the same job with TOS 4.1.3, all is right :
- We don't have to complete the server-config.wsdd,
- The webservice call is OK with the first URL, and the job use the URL's context param

Thanks for your help (sorry for my english...),
Frederic
Labels (5)
1 Reply
Anonymous
Not applicable
Author

Hi Frederic
We have a KB article on Talend Help Center, it shows how to expose a Talend Job as a Web service and how to call the Web service with context parameters:
https://help.talend.com/search/all?query=twebservice&content-lang=en
You don't need to modify the wsdd file, there might be a bug on version 5.4.0 if it does not work even though you have completely followed the steps introduced in the article.
Shong