One Star

[resolved] Getting "The constructor URI() is not visible" in tWebservice

Hi,
I'm trying to integrate with "service now" webservice (for example using this wsdl:
https://demo15.service-now.com/imp_computer.do?WSDL
user: admin password: admin)
I can retrieve the wsdl and get the correct data fields in the input/output mapping : But when I run the script, I get the following error:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
The constructor URI() is not visible
Syntax error, insert ")" to complete ClassInstanceCreationExpression
Syntax error, insert ";" to complete LocalVariableDeclarationStatement
Syntax error on token(s), misplaced construct(s)
Syntax error on token ":", EmptyStatement expected after this token
Syntax error, insert ")" to complete ClassInstanceCreationExpression
Syntax error, insert ";" to complete BlockStatements
etc etc
Any suggestions?
If I try with the http://www.deeptraining.com/webservices/weather.asmx?WSDL webservice I do not get the same error.
BR
Anders
1 ACCEPTED SOLUTION

Accepted Solutions
One Star

Re: [resolved] Getting "The constructor URI() is not visible" in tWebservice

I got it working by changing the:
".UnqualifiedElementFormDefault" option on server side
4 REPLIES
One Star

Re: [resolved] Getting "The constructor URI() is not visible" in tWebservice

Try to put double quotes around the wsdl url.
Nicolas
One Star

Re: [resolved] Getting "The constructor URI() is not visible" in tWebservice

It worked.....Thanks for the answer!
One Star

Re: [resolved] Getting "The constructor URI() is not visible" in tWebservice

I now have problem when parsing the response: The mapped parameters all says "null", but when I run it in SoapUI I get decent values in all fields:
<SOAP-ENV:Envelope xmlnsSmiley FrustratedOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<insertResponse xmlns="http://www.service-now.com/u_aw_test">
<sys_id>7c1f530ed9283000930e426c8cf34cea</sys_id>
<table>cmdb_ci_aix_server</table>
<display_name>name</display_name>
<display_value>Anderstorp</display_value>
<status>ignored</status>
<status_message>No field values changed</status_message>
</insertResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
If I try the "getWeather" webservice from deeptraing it works fine in Talend Studio (In SoapUI there is a slight difference in the tagging of the envelope between the different webservicesSmiley Happy
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetWeatherResponse xmlns="http://litwinconsulting.com/webservices/">
<GetWeatherResult>Sunny</GetWeatherResult>
</GetWeatherResponse>
</soap:Body>
</soap:Envelope
Any ideas?
BR
Anders
One Star

Re: [resolved] Getting "The constructor URI() is not visible" in tWebservice

I got it working by changing the:
".UnqualifiedElementFormDefault" option on server side