Web Service Consumption

Web Service Consumption

  
I have attached a Word document with screenshots and a number of questions related to the consumption of Web Services.

 Any assistance would be appreciated.
Colin -

Creating the reference to the service will also generate the needed Structures, as you've shown. You can now create a variable of type "Record" and give it a definition of "StatusListType", and start adding the data to it, and pass it into the service.

J.Ja
Thanks Justin.  Spot on.  As soon as I read your response I could have kicked myself for not realising that myself :-)

All a bit academic really, because as soon as I add the Web Reference and try to publish the eSpace, OS raises an error message and I am unable to publish the eSpace anyway :-)

Internal Error
 
Generic SQL Error. String or binary data would be truncated.
The statement has been terminated. System.Data.SqlClient.SqlException: String or binary data would be truncated.
The statement has been terminated.
   at OutSystems.HubEdition.RuntimePlatform.DBHelper.#7ab(DbException e, IDbTransaction trans)
   at OutSystems.HubEdition.RuntimePlatform.DBHelper.ExecuteNonQueryDontCleanParameters(IDbCommand cmd, String description, Boolean isApplication, Boolean skipLog)
   at OutSystems.HubEdition.RuntimePlatform.DBHelper.ExecuteNonQuery(IDbCommand cmd)
   at OutSystems.HubEdition.DeploymentController.DBCompilerService.ExecuteInlineStatementWithTimeout(IDbTransaction tran, String statement, Int32 timeout)
   at #pcc.#h3.#4fc(HEMessageArrayList warnings, IDbTransaction adminTrans, Dictionary`2 schemaTransactions, String fullQuery, Int32 updateDBTimeout)
SQL: INSERT INTO "OSSYS_WEB_REFERENCE" (SS_Key, Name, Original_Name, Espace_Id, URL, Log_Requests, Integrated_Authentication, Is_Active) VALUES ('4dd3a3c6-2cfa-4f4b-9989-1897656bd669', 'StatusList', 'ipostep_vP.0010000102.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc_Service', 53, 'http://ISBUK-LT99.ISBGlobalUK.local:8080/B1iXcellerator/exec/soap/vP.0010000102.in_WCSX/com.sap.b1i.vplatform.runtime/INB_WS_CALL_SYNC_XPT/INB_WS_CALL_SYNC_XPT.ipo/proc', 1, 0,1)
 
;
.
 
Exception Details:
[1] Internal Error: Generic SQL Error. String or binary data would be truncated.
The statement has been terminated. System.Data.SqlClient.SqlException: String or binary data would be truncated.
The statement has been terminated.
   at OutSystems.HubEdition.RuntimePlatform.DBHelper.#7ab(DbException e, IDbTransaction trans)
   at OutSystems.HubEdition.RuntimePlatform.DBHelper.ExecuteNonQueryDontCleanParameters(IDbCommand cmd, String description, Boolean isApplication, Boolean skipLog)
   at OutSystems.HubEdition.RuntimePlatform.DBHelper.ExecuteNonQuery(IDbCommand cmd)
   at OutSystems.HubEdition.DeploymentController.DBCompilerService.ExecuteInlineStatementWithTimeout(IDbTransaction tran, String statement, Int32 timeout)
   at #pcc.#h3.#4fc(HEMessageArrayList warnings, IDbTransaction adminTrans, Dictionary`2 schemaTransactions, String fullQuery, Int32 updateDBTimeout)
SQL: INSERT INTO "OSSYS_WEB_REFERENCE" (SS_Key, Name, Original_Name, Espace_Id, URL, Log_Requests, Integrated_Authentication, Is_Active) VALUES ('4dd3a3c6-2cfa-4f4b-9989-1897656bd669', 'StatusList', 'ipostep_vP.0010000102.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc_Service', 53, 'http://ISBUK-LT99.ISBGlobalUK.local:8080/B1iXcellerator/exec/soap/vP.0010000102.in_WCSX/com.sap.b1i.vplatform.runtime/INB_WS_CALL_SYNC_XPT/INB_WS_CALL_SYNC_XPT.ipo/proc', 1, 0,1)
 
;
.
at #pcc.#h3.#4fc(HEMessageArrayList warnings, IDbTransaction adminTrans, Dictionary`2 schemaTransactions, String fullQuery, Int32 updateDBTimeout)
   at #pcc.#h3.#3fc(String eSpaceName, HEMessageArrayList warnings, Int32 eSpaceVersionId, DeployPhase phase, String uniqueId)
   at #pcc.#h3.#Rfc(String eSpaceName, Int32 eSpaceVersionId, String uniqueId, String username, DeployPhase phase)
   at #pcc.#h3.#Rfc(ICompilerContext context, String eSpaceName, Int32 eSpaceVersionId, String uniqueId, String username, DeployPhase phase)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
   at System.Runtime.Remoting.Messaging.ServerObjectTerminatorSink.SyncProcessMessage(IMessage reqMsg)
   at System.Runtime.Remoting.Messaging.ServerContextTerminatorSink.SyncProcessMessage(IMessage reqMsg)
   at System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessageCallback(Object[] args)
   at System.Runtime.Remoting.Channels.ChannelServices.DispatchMessage(IServerChannelSinkStack sinkStack, IMessage msg, IMessage& replyMsg)
   at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
   at #pcc.#h3.#Jhc.#Ghc(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
   at System.Runtime.Remoting.Channels.Tcp.TcpServerTransportSink.ServiceRequest(Object state)
   at System.Runtime.Remoting.Channels.SocketHandler.ProcessRequestNow()
   at System.Runtime.Remoting.Channels.SocketHandler.BeginReadMessageCallback(IAsyncResult ar)
   at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Net.ContextAwareResult.Complete(IntPtr userToken)
   at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
   at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
[2] System.Data.SqlClient.SqlException: String or binary data would be truncated.
The statement has been terminated.
   at OutSystems.HubEdition.RuntimePlatform.DBHelper.#7ab(DbException e, IDbTransaction trans)
   at OutSystems.HubEdition.RuntimePlatform.DBHelper.ExecuteNonQueryDontCleanParameters(IDbCommand cmd, String description, Boolean isApplication, Boolean skipLog)
   at OutSystems.HubEdition.RuntimePlatform.DBHelper.ExecuteNonQuery(IDbCommand cmd)
   at OutSystems.HubEdition.DeploymentController.DBCompilerService.ExecuteInlineStatementWithTimeout(IDbTransaction tran, String statement, Int32 timeout)
   at #pcc.#h3.#4fc(HEMessageArrayList warnings, IDbTransaction adminTrans, Dictionary`2 schemaTransactions, String fullQuery, Int32 updateDBTimeout)
Colin -

That's not a good bug. If you haven't kicked that over to OS support, I suggest you do so. Basicaly, something in that Web Service's description has a value so big, it exceeds the field length that it is trying to be stored in...

J.Ja
This was my conclusion too.  I kicked off a support call early this morning.  The value I am trying to pass to the OS table for Original_Name is 119 characters long and the underlying table supports a column width of 100
I have temporarily overcome this issue, by manually updating the width of the ORIGINAL_NAME column in the OSSYS_WEB_REFERENCE table to 1000 characters.  Now my eSpace publishes and I am able to consume the web service
Thanks to Outsystems Support I am now changing my wsdl:service name to something shorter and have changed the definition of the underlying table definition back to its original.  Server names have been changed to protect the innocent LOL


Example:

<wsdl:service name="My_WebService_Definition">
<wsdl:port name="ipostep_vP.0010000102.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc_SoapBinding_HTTP" binding="tns:ipostep_vP.0010000102.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc_SoapBinding">
<soap:address location="http://IMyServer:8080/B1iXcellerator/exec/soap/vP.0010000102.in_WCSX/com.sap.b1i.vplatform.runtime/INB_WS_CALL_SYNC_XPT/INB_WS_CALL_SYNC_XPT.ipo/proc"/>
</wsdl:port>
<wsdl:port name="ipostep_vP.0010000102.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc_SoapBinding_HTTPS" binding="tns:ipostep_vP.0010000102.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc_SoapBinding">
<soap:address location="https://MyServer:8443/B1iXcellerator/exec/soap/vP.0010000102.in_WCSX/com.sap.b1i.vplatform.runtime/INB_WS_CALL_SYNC_XPT/INB_WS_CALL_SYNC_XPT.ipo/proc"/>
</wsdl:port>
</wsdl:service>
Colin -

Sounds good, glad it worked out!

J.Ja