I have integrated SOAP service in trial version of Sales Creatio. The test request was successful and returns the response parameters correctly, but when I'm trying to call the webservice in business process and bind the response parameter to auto-generated page, it shown only "Response body" in Process Elements parameter.

 

Please, refer the screenshots attached.

 

 

 

Any guidance would be appreciated!

Like 0

Like

3 comments

My guess is that it is because the web service is returning an array of records and the MemberNumber is from an element in the array/collection. If the web service is really just returning one record, but wrapping it in an array, you could map the field in the web services setup in Creatio as something like (you might need to modify this to match the structure of the json returned from the API):

$.[0].MemberNumber

To specifically get the value from the record at index 0 of the array.

Ryan

How to bind all the records from array/collection in grid from web service response without entity?

Revathi,

You’ll need to use a subprocess and pass each item returned to the sub process. See an article on that here https://customerfx.com/article/working-with-collections-from-a-web-service-element-in-a-process-in-creatio/

Ryan

Show all comments

Hi I need add WS-Addressing in my soap request like: https://www.w3.org/submissions/ws-addressing/

Can I create such a connection in creatio? Is it necessary to write such a service in .net?

Like 0

Like

1 comments

Hello,

 

Unfortunately, the SOAP-Header settings functionality is not yet implemented.

 

As a workaround, we can suggest configuring the request body and passing it as a parameter

- If you are using a web service in the process, the "Call web service" element has a "Request body" parameter. It can be found in advanced settings mode.

 

Show all comments
Question

Hello, 

 

There is any way to add XML attributes on the SOAP integration webservices?

 

https://www.w3schools.com/xml/xml_attributes.asp

Like 0

Like

4 comments

Hello Federico,

 

Yes, it is possible to add XML attributes in SOAP integration web services. In SOAP, XML attributes can be added to the SOAP message header and body elements. The SOAP message header contains optional attributes that provide additional information about the message, while the SOAP message body can have attributes that describe the data being transmitted.

To add XML attributes to a SOAP message, you need to define the attribute in the WSDL file and then include the attribute in the SOAP message. The WSDL file specifies the XML schema that defines the structure of the SOAP message, including any attributes that are allowed.

You can add XML attributes to the SOAP message using various programming languages and tools, such as Java, .NET, and PHP. For example, in Java, you can use the JAX-WS API to add attributes to the SOAP message header and body elements.

It is important to note that adding XML attributes to a SOAP message can impact the interoperability of the web service, as different systems may interpret the attributes differently. Therefore, it is recommended to follow the XML schema standards and best practices when adding attributes to SOAP messages.



Best regards,

Bogdan S.

Bogdan Spasibov,

Can you give me a example how to add this in the parameters?

 

I need to add MessageId="getAccountMsg" and 

  <DeviceInformation DeviceType="CREATIO" DeviceNumber="0000"/> I can't make it works using the webservice integration.

&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:acc="http://www.symxchange.generated.symitar.com/account" xmlns:tns="http://www.symxchange.generated.symitar.com/common/dto/common"&gt;
   &lt;soapenv:Header/&gt;
   &lt;soapenv:Body&gt;
      &lt;acc:getAccount&gt;
         &lt;Request MessageId="getAccountMsg"&gt;
            &lt;AccountNumber&gt;1234&lt;/AccountNumber&gt;
               &lt;UserNumberCredentials&gt;
                  &lt;!--Optional:--&gt;
                  &lt;UserNumber&lt;/UserNumber&gt;
                  &lt;Password&gt;&lt;/Password&gt;
               &lt;/UserNumberCredentials&gt;
            &lt;/Credentials&gt;
            &lt;DeviceInformation DeviceType="CREATIO" DeviceNumber="000000"/&gt;
         &lt;/Request&gt;
      &lt;/acc:getAccount&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;

 

To add the MessageId="getAccountMsg" and &lt;DeviceInformation DeviceType="CREATIO" DeviceNumber="0000"/&gt; parameters to the SOAP request, you would need to modify the XML code as follows:



<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:acc="http://www.symxchange.generated.symitar.com/account" xmlns:tns="http://www.symxchange.generated.symitar.com/common/dto/common">

   <soapenv:Header/>

   <soapenv:Body>

      <acc:getAccount>

         <Request MessageId="getAccountMsg">

            <AccountNumber>1234</AccountNumber>

            <UserNumberCredentials>

               <!--Optional:-->

               <UserNumber></UserNumber>

               <Password></Password>

            </UserNumberCredentials>

            <DeviceInformation DeviceType="CREATIO" DeviceNumber="0000"/>

         </Request>

      </acc:getAccount>

   </soapenv:Body>

</soapenv:Envelope>

 

Anton Starikov,

Hi Anton I need to know how to add that in the UI since from the wdsl is not taking that value like is in the xml. I need a example to see how to add the parameter in the UI for the attribute MessageId.

Show all comments

Hi Community,

 

I'm having troubles generating a request with the following XML body, using the "Call Web Service" integration tool.

<soapenv:Envelope xmlns:soap="" xmlns:cam="" xmlns:soapenv="">
	<soapenv:Header />
	<soapenv:Body>
		<cam:startProcessCampanhasaaaaa>
			<soap:request>
				<soap:agencia>1</soap:agencia>
				<soap:argumentarioVenda>A</soap:argumentarioVenda>
				<soap:nomeCampanha>A</soap:nomeCampanha>
				<soap:nomeEntidade>A</soap:nomeEntidade>
				<soap:notasAdicionais>A</soap:notasAdicionais>
				<soap:numeroEntidade>A</soap:numeroEntidade>
				<soap:requestId>A</soap:requestId>
				<soap:validadeTarefa>1</soap:validadeTarefa>
				<soap:gestorEntidade>A</soap:gestorEntidade>
			</soap:request>
		</cam:startProcessCampanhasaaaaa>
	</soapenv:Body>
</soapenv:Envelope>

Basically, when I tried to add the necessary parameters for the request, I've noticed that I can't add an object parameter without defining it as an array.

This setting is blocking me from following the structure of the request above. Because the "request" parameter is not an array. I also tried to import the wsdl, and it didn't work either.

 

Is there a way to bypass this? Should I create a script task instead?

 

Thank you in advance.

 

Best Regards,

Pedro Pinheiro

Like 1

Like

3 comments

Hello,

 

You can create this service manually.

Because this is an OOTB behavior with the value "is array".

Hi Kalymbet Anastasia,

 

Sorry, but I didn't understand your answer. The property "Is array" is true by default.

 

Do I need to create the soap request using a script task? 

 

Best Regards,

Pedro Pinheiro

Pedro Pinheiro,

 

Yes, you're right. When the request parameter is of type object the collection is considered a typed array and the checkbox is checked by default and not editable.



In this case, using a script task for the SOAP service would solve the case.



BR,

Bhoobalan Palanivelu.

Show all comments

Hi community,

 

We've this situation where we need to send all the attachments that are linked to Documents, including the byte[] data, to a SOAP based service.

We have two solutions in order to implement this:

  1. To send the attachments we could simply convert the byte[] data to base64 string and send it within the body of the SOAP message. Some of the files are more than 10MB, so this is not the best solution.
  2. The other solution is to use the MTOM message encoder, to send the attachments in multiple parts.

We have two questions:

  1. What are the best ways to send multiple attachments through SOAP based requests?
  2. If we choose to send the attachments using MTOM, how can we implement this?

Thanks in Advance.

 

Best Regards,

Pedro Pinheiro

 

 

Like 2

Like

1 comments

Hi Pedro,

 

Maybe it's better to call the https://<instance>/0/rest/FileService/GetFile/7B332DB9-3993-4136-AC32-09353333CC7A/fileId for all the files and receive a response from the third party service? You need to call this link for each record from the DocumentFile table (filed should be modified for each time with an actual Id of a record from the DocumentFile table). Previously we didn't have such requests and we have no practical example of the logic deployment. The link above is a base link used to download attachments when clicking them on the "Attachments" detail so you can try calling it in the webservice.

 

Best regards,

Oscar

Show all comments

Hi community,

 

We have this situation where we need to create a bi-directional connection with our customer platform, using SOAP protocol. We would like to know if its possible to create a SOAP based services in Creatio to be accessed by our customer? If yes, any information on how to implement this?

 

Thanks in Advance.

 

Best Regards,

Pedro Pinheiro

Like 0

Like

10 comments

Hello Pedro,

 

You need to develop a configuration service (either regular or anonymous) using SOAP. Here is the article that describes how to configure web-services and integrate them into the Creatio app.

 

For example:

1) Create a source code for the service contract SPMSUBPServiceContract:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
 
namespace SPMSUBPService
{
    [ServiceContract]
    public interface IService
    {
        [OperationContract]
        SPMClientInfoResponse SPMClientInfo(string Login);
    }
 
    [DataContract]
    public class SPMClientInfoResponse
    {
        bool success = true;
        string errorText = "";
 
        [DataMember]
        public bool Success
        {
            get { return success; }
            set { success = value; }
        }
 
        [DataMember]
        public string ErrorText
        {
            get { return errorText; }
            set { errorText = value; }
        }
    }
}

and the source code of the SPMSUBPService service directly:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
 
namespace SPMSUBPService
{
    public class SPMSUBPService : IService
    {
        public SPMClientInfoResponse SPMClientInfo(string Login)
        {
            return new SPMClientInfoResponse();
        }
    }
}

2) Create a file with SPMSUBPService.svc name in the Terrasoft.WebApp\ServiceModel folder with the following text:

 

<%@ ServiceHost Language="C#" Debug="true" Service="SPMSUBPService.SPMSUBPService" Factory="System.ServiceModel.Activation.ServiceHostFactory" %>

 

3) Add the description of the service to the Terrasoft.WebApp\ServiceModel\http\services.config file:

&lt;services&gt;
    ...
    &lt;service behaviorConfiguration="BaseServiceBehavior" name="SPMSUBPService.SPMSUBPService"&gt;
        &lt;endpoint name="SPMSUBPServiceEndPoint"
            binding="webHttpBinding"
            behaviorConfiguration="RestServiceBehavior"
            bindingNamespace="http://Terrasoft.WebApp.ServiceModel"
            contract="SPMSUBPService.IService" /&gt;
        &lt;endpoint address="soap" binding="basicHttpBinding" contract="SPMSUBPService.IService"/&gt;
        &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt;
    &lt;/service&gt;
    ...
&lt;/services&gt;

4) Modify the Terrasoft.WebApp\Web.config file:

...
&lt;location path="ServiceModel/SPMSUBPService.svc"&gt;
    &lt;system.web&gt;
      &lt;authorization&gt;
        &lt;allow users="*" /&gt;
      &lt;/authorization&gt;
    &lt;/system.web&gt;
&lt;/location&gt;
...

And everything is ready, the service is accessible via /0/ServiceModel/SPMSUBPService.svc and the WSDL as well /0/ServiceModel/SPMSUBPService.svc?singleWsdl

 

Best regards,

Oscar

Oscar Dylan,

 

Thank you for your response.

 

I've tried to implement the solution you provided above and I'm getting this error when sending a request through both Postman and SoapUI.

Can you please tell me what this error means and how can I fix it?

 

Thanks in Advance.

 

Best Regards,

Pedro Pinheiro

 

Hi Pedro Pinheiro,

Did you got the WSDL file. For me it is showing 404 not found error if I try to access that url.

Also how can we know the what input format to pass parameters to method. Can you share those details here.

 

Thanks in advance.

Regards,

Manideep.

Hi Korni Manideep Reddy,

 

We manage to make this service working, but since it was a long time ago we don't have the specific steps to fix the error.

 

However,  we have the updated steps that we use in order to make the service available. Maybe if you go through these following steps  you could fix your problem.

 

Note: These steps only work for .Net Framework instances.

 

1. Create a new file called “DemoServiceName.svc" in ..\Terrasoft.WebApp\ServiceModel folder, and add this line:

 

<%@ ServiceHost Language="C#" Debug="true" Service="Terrasoft.Configuration.DemoServiceNameSpace.DemoServiceName” Factory="System.ServiceModel.Activation.ServiceHostFactory" %>

 

2. Add the following configuration to the ..\Terrasoft.WebApp\web.config file:

 

<configuration>

  ...

  <location path="ServiceModel/DemoServiceName.svc">

    <system.web>

      <authorization>

        <allow users="*" />

      </authorization>

    </system.web>

  </location>

  ...

  <appSettings>

    ...

    <add key="AllowedLocations" value="https://yourwebsitedomain.creatio.com/0/;ServiceModel/DemoServiceName.s…"  />

    ...

  </appSettings>

  ...

</configuration>

 

3. Add the following service to the ..\Terrasoft.WebApp\ServiceModel\https\services.config file:

 

    <service behaviorConfiguration="BaseServiceBehavior" name="Terrasoft.Configuration.DemoServiceNameSpace.DemoServiceName">

        <endpoint name=“DemoServiceNameEndpoint" address="" binding="webHttpBinding" behaviorConfiguration="RestServiceBehavior" bindingNamespace="http://Terrasoft.WebApp.ServiceModel" contract="Terrasoft.Configuration.DemoServiceNameSpace.IDemoServiceNameRest" />

        <endpoint address="soap/demoservicename” binding="basicHttpBinding" contract="Terrasoft.Configuration.DemoServiceNameSpace.IDemoServiceNameSoap"/>

    </service>

 

4. Add the following service to the ..\Terrasoft.WebApp\ServiceModel\http\services.config file:

 

    <service behaviorConfiguration="BaseServiceBehavior" name="Terrasoft.Configuration.DemoServiceNameSpace.DemoServiceName">

 

        <endpoint name="DemoServiceNameEndpoint" address="" binding="webHttpBinding" behaviorConfiguration="RestServiceBehavior" bindingNamespace="http://Terrasoft.WebApp.ServiceModel" contract="Terrasoft.Configuration.DemoServiceNameSpace.IDemoServiceNameRest" />

 

        <endpoint address="soap/demoservicename" binding="basicHttpBinding" contract="Terrasoft.Configuration.DemoServiceNameSpace.IDemoServiceNameSoap"/>

 

    </service>

 

5. In the ..\Terrasoft.WebApp\ServiceModel\https\bindings.config file we need to change the basicHttpBinding to:

 

<basicHttpBinding>

        <binding maxReceivedMessageSize="10485760">

            <readerQuotas maxDepth="32" maxStringContentLength="10485760" maxArrayLength="10485760" maxBytesPerRead="10485760"/>

            <security mode="Transport">

                <transport clientCredentialType="None" />

            </security>

        </binding>

        <binding name="ReportServiceBinding">

            <security mode="Transport">

                <transport clientCredentialType="None" />

            </security>

        </binding>

</basicHttpBinding>

 

 

6. In the ..\Terrasoft.WebApp\ServiceModel\http\bindings.config file we need to change the basicHttpBinding to:

 

<basicHttpBinding>

    <binding maxReceivedMessageSize="10485760">

        <readerQuotas maxDepth="32" maxStringContentLength="10485760" maxArrayLength="10485760" maxBytesPerRead="10485760"/>

        <security mode="Transport">

            <transport clientCredentialType="None" />

        </security>

    </binding>

    <binding name="ReportServiceBinding" />

</basicHttpBinding>

 

After all of this changes are made the application needs to be restarted.

 

About the input format of the method, we used a CustomObject and CustomResponse which we define using the DataContract attribute.

 

        public class DemoServiceName: IDemoServiceNameRest, IDemoServiceNameSoap {
             //This service needs to be anonymous.
             //Implement Methods here. you don't need to define WebInvoke here.
        }
 
        [ServiceContract]
		public interface IDemoServiceNameSoap
		{
           	[OperationContract]
		    CustomResponse MethodNameSoap(CustomObject cobject);  
		}
 
 
		[ServiceContract]
		public interface IDemoServiceNameRest
		{
          	[OperationContract]
			[WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Xml, ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare)]
		    CustomResponse MethodNameRest(CustomObject cobject);
		}

 

Hope this helps solving your issue.

 

Best Regards,

Pedro Pinheiro

 

 

 

Hi Pedro Pinheiro,

I have tried above configuration settings But I am still not able to set  soap service. I am getting 500 ServiceActivationException.

 

Rakshith Dheer Reddy,

 

What is the error description you receive when trying to access "http://localhost:83/0/ServiceModel/SoapTestService.svc" through a browser?

 

Best Regards,

Pedro Pinheiro

Pedro Pinheiro,

We are getting this error from the browser. 

Hi Pedro Pinheiro,

In Postman, I am getting 500 error with ActionNotSupported.

Hi Kumaran K,

 

Sorry, I forgot to mention that you need to add the service behavior for the metadata. This can be done with the following steps:

 

1. In the ..\Terrasoft.WebApp\ServiceModel\https\behaviors.config file we need to set the httpsGetEnabled to true on both behaviors:

 

&lt;serviceBehaviors&gt;
 
...
 
              &lt;behavior name="BaseServiceBehavior"&gt;
 
                       ...
 
                       &lt;serviceMetadata httpsGetEnabled="true" /&gt;
 
                       ...
 
              &lt;/behavior&gt;
 
             &lt;behavior name="RestServiceBehavior"&gt;
 
                       ...
 
                       &lt;serviceMetadata httpsGetEnabled="true" /&gt;
 
                       ...
 
             &lt;/behavior&gt;
 
...
 
&lt;/serviceBehaviors&gt;

 

2. In the ..\Terrasoft.WebApp\ServiceModel\http\behaviors.config file we need to set the httpGetEnabled to true on both behaviors:

 

&lt;serviceBehaviors&gt;
 
...
 
              &lt;behavior name="BaseServiceBehavior"&gt;
 
                       ...
 
                       &lt;serviceMetadata httpGetEnabled="true" /&gt;
 
                       ...
 
              &lt;/behavior&gt;
 
             &lt;behavior name="RestServiceBehavior"&gt;
 
                       ...
 
                       &lt;serviceMetadata httpGetEnabled="true" /&gt;
 
                       ...
 
             &lt;/behavior&gt;
 
...&lt;/serviceBehaviors&gt;



Hope this helps.

 

Best Regards,

Pedro Pinheiro

Pedro Pinheiro,

Thank you, Pedro.

The soap service is working.

Show all comments