Cannot connect to NetSuite web services

Cannot connect to NetSuite web services

  
We are getting an error when trying to establish a Web Reference in the Enterprise version of OutSystem's Agile PAAS to our ERP program (NetSuite).  Our Agile system is Java based.  When I tried connecting to NetSuite via a Web Reference using the MS based Community Edition I got a brief error in a message box, but was able to continue & successfully publish.  When using C# code in MS Visual Studio 2013 (.NET 4.5), I experienced no problems at all in consuming the methods/services of NetSuite.  Here are the steps that led to the problem :

Add a Web Reference with the NetSuite wsdl.  The Agile system processes the wsdl and produces the following error in a message box : "WSDL Load Warning  'getAsyncResult' method output parameters definition is invalid."

After clicking the 1-Click Publish button there is a Red Warning that states: "Invalid Web Reference  The NetSuiteService web reference could not be imported because it is not supported." and a dump with the following data :

Invalid Web Reference  The NetSuiteService web reference could not be imported because it is not supported.

Exception Details:

[1] Invalid Web Reference: The NetSuiteService web reference could not be imported because it is not supported.
   at outsystems.hubedition.compiler.WebReference.$ofi(Unknown Source)
   at outsystems.hubedition.compiler.WebReference.$rei(Unknown Source)
   at outsystems.hubedition.compiler.AbstractSimpleRecord.dumpJava(Unknown Source)
   at outsystems.hubedition.compiler.AbstractSimpleRecord.dump(Unknown Source)
   at outsystems.hubedition.compiler.ESpace.dumpStructuresJava(Unknown Source)
   at outsystems.hubedition.compiler.ESpace.dumpStructures(Unknown Source)
   at outsystems.hubedition.compiler.ESpace.dump(Unknown Source)
   at outsystems.hubedition.compiler.Compiler.mainExec(Unknown Source)
   at outsystems.hubedition.compiler.Compiler.realMain(Unknown Source)
   at outsystems.hubedition.compiler.Compiler.innerMain(Unknown Source)
   at outsystems.hubedition.compiler.Compiler.main(Unknown Source)
[2] java.lang.Exception: parsing WSDL...

[WARNING] src-import.3.1: The namespace attribute, 'urn:employees_2013_1.transactions.webservices.netsuite.com', of an <import> element information item must be identical to the targetNamespace attribute, 'urn:employees_2013_1.lists.webservices.netsuite.com', of the imported document.
  line 2 of file:/opt/outsystems/platform/share/NetSuiteConnectorMod/full/WEB-INF/webreferences/NetSuiteService_employees_xsd

[ERROR] the target namespace of the imported schema "urn:employees_2013_1.lists.webservices.netsuite.com" doesn't agree with the expected value "urn:employees_2013_1.transactions.webservices.netsuite.com"
  line 2 of file:/opt/outsystems/platform/share/NetSuiteConnectorMod/full/WEB-INF/webreferences/NetSuiteService_employees_xsd

   at outsystems.hubedition.compiler.webservices.WsConsume.executeWsConsume(Unknown Source)
   at outsystems.hubedition.compiler.webservices.WsConsume.run(Unknown Source)
   at outsystems.hubedition.compiler.WebReference.$uhi(Unknown Source)
   at outsystems.hubedition.compiler.WebReference.$ofi(Unknown Source)
   at outsystems.hubedition.compiler.WebReference.$rei(Unknown Source)
   at outsystems.hubedition.compiler.AbstractSimpleRecord.dumpJava(Unknown Source)
   at outsystems.hubedition.compiler.AbstractSimpleRecord.dump(Unknown Source)
   at outsystems.hubedition.compiler.ESpace.dumpStructuresJava(Unknown Source)
   at outsystems.hubedition.compiler.ESpace.dumpStructures(Unknown Source)
   at outsystems.hubedition.compiler.ESpace.dump(Unknown Source)
   at outsystems.hubedition.compiler.Compiler.mainExec(Unknown Source)
   at outsystems.hubedition.compiler.Compiler.realMain(Unknown Source)
   at outsystems.hubedition.compiler.Compiler.innerMain(Unknown Source)
   at outsystems.hubedition.compiler.Compiler.main(Unknown Source)


Hi Greg,

First of all welcome to the community.
There are some constraints as to import webservices directly in Service Studio. You can validate those thru this link: http://www.outsystems.com/help/servicestudio/8.0/Integrating_with_other_systems/Web_Services/Service_Studio_Web_Services_Constraints.htm

If you hit any of these you will need to create an extension using Integration Studio to connect to that webservice. Since you have a Java installation you'll need to import the webservice possibly using Eclipse and create actions to wrap the methods you wish to use from that webservice.

That said I search for the WSDL for netsuite and tried to reproduce your steps. Here's my findings:
  • Note: I'm using a .NET installation!
  • Created a new app
  • Imported webreference using wsdl found on netsuite site: http://webservices.netsuite.com/wsdl/v2013_2_0/netsuite.wsdl
  • Got the same warning you did: 'getAsyncResult' method output parameters definition is invalid.
  • Published without error. I didn't try it out because I don't have an account and you should check how to perform authentication to the webservice.
  • It seems this is a problem in the Java stack and I strongly suggest you submit from Service Studio your error.
Workaround
It seeems the problem is related with the warning my suggestions is that you delete (using the delete key) the async methods and structures and try to publish again. If you don't need to perform async calls than you're good to go. If you need them then you should follow up on that case with our support.

Cheers,

Hi Greg

Just to complement André's post: you can use the instructions on www.outsystems.com/goto/web-service-java-extension to create an extension to import a web reference when it is not possible to do so in Service Studio.

Tip: it is frequent that a web reference cannot be imported in Service Studio but that only affects one or two methods. You can always try to remove some methods from the WSDL and see if it works - and if you don't need those methods just let it be. If you do need them, you can save a lot of trouble by just importing with an extension the methods you could not import in Service Studio.

Regards,
Acácio