Consuming the WCF SOAP Service in Bonita BPM using Connectors (using SOAP 1.2 connector provided in Bonita)

1
0
-1

Hi, We have a WCF SOAP Service , we are trying to consume that service in Bonita BPM using Connectors, but we are not able to consume it. Could you please help with this. Please let us know if any useful information on this.

Thanks, Kishore

Comments

Submitted by aurelien.pupier on Sun, 08/10/2014 - 21:01

Hi, please provide more information. Which parameters did you provide to teh connector? Do you have an exception at Runtime? WHich one it is? Did you try the "test connector" menu directly inside the Studio? Do you have an error?

Regards,

Submitted by karumanchikishore on Mon, 08/11/2014 - 11:30

We are passing these parameters http://tempuri.org/ ** as **Service Name ![WSDL Of SVC][WSDL Of SVC] SurveyAutomationActivation as Service NS http://tempuri.org/ISurveyAutomationActivation/ActivatingSurveyAutomation as Soap Action SurveyAutomation as Port Name http://localhost/SurveyAutomationActivation.svc as Endpoint Address

http://www.w3.org/2003/05/soap/bindings/HTTP/ as Binding

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/">
<soap:Header/>
<soap:Body>
<tem:ActivatingSurveyAutomation/>
</soap:Body>
</soap:Envelope>

as Envelope according to wsdl for consuming this WCF Soap (svc) service but when i am trying to test it , it is giving me error

** java.lang.reflect.InvocationTargetException org.bonitasoft.engine.bpm.connector.ConnectorExecutionException: USERNAME=install | org.bonitasoft.engine.core.connector.exception.SConnectorException: org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: java.lang.IndexOutOfBoundsException: Index: 1, Size: 0**

even i have type casted the output in correct format using groovy then also it is giving me the above error but when i am using the same code in simple asmx web services it is working out , can you please tell me what exactly the error is in this wcf soap service whose image of wsdl i have attached with this message. Kindly help me resolve this issue.

This is the WSDL File Content of the wsdl which we are using.

<wsdl:definitions name="SurveyAutomationActivation" targetNamespace="http://tempuri.org/">
  <wsdl:types>
    <xs:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
      <xs:import namespace="http://schemas.datacontract.org/2004/07/SurveyAutomationLauncher"/>
      <xs:element name="ActivatingSurveyAutomation">
        <xs:complexType>
          <xs:sequence/>
        </xs:complexType>
      </xs:element>
      <xs:element name="ActivatingSurveyAutomationResponse">
        <xs:complexType>
          <xs:sequence>
            <xs:element minOccurs="0" name="ActivatingSurveyAutomationResult" nillable="true" type="q1:SurveyAutomationActivationResponse"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
    <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/">
      <xs:element name="anyType" nillable="true" type="xs:anyType"/>
      <xs:element name="anyURI" nillable="true" type="xs:anyURI"/>
      <xs:element name="base64Binary" nillable="true" type="xs:base64Binary"/>
      <xs:element name="boolean" nillable="true" type="xs:boolean"/>
      <xs:element name="byte" nillable="true" type="xs:byte"/>
      <xs:element name="dateTime" nillable="true" type="xs:dateTime"/>
      <xs:element name="decimal" nillable="true" type="xs:decimal"/>
      <xs:element name="double" nillable="true" type="xs:double"/>
      <xs:element name="float" nillable="true" type="xs:float"/>
      <xs:element name="int" nillable="true" type="xs:int"/>
      <xs:element name="long" nillable="true" type="xs:long"/>
      <xs:element name="QName" nillable="true" type="xs:QName"/>
      <xs:element name="short" nillable="true" type="xs:short"/>
      <xs:element name="string" nillable="true" type="xs:string"/>
      <xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte"/>
      <xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt"/>
      <xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong"/>
      <xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort"/>
      <xs:element name="char" nillable="true" type="tns:char"/>
      <xs:simpleType name="char">
        <xs:restriction base="xs:int"/>
      </xs:simpleType>
      <xs:element name="duration" nillable="true" type="tns:duration"/>
      <xs:simpleType name="duration">
        <xs:restriction base="xs:duration">
          <xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?"/>
          <xs:minInclusive value="-P10675199DT2H48M5.4775808S"/>
          <xs:maxInclusive value="P10675199DT2H48M5.4775807S"/>
        </xs:restriction>
      </xs:simpleType>
      <xs:element name="guid" nillable="true" type="tns:guid"/>
      <xs:simpleType name="guid">
        <xs:restriction base="xs:string">
          <xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}"/>
        </xs:restriction>
      </xs:simpleType>
      <xs:attribute name="FactoryType" type="xs:QName"/>
      <xs:attribute name="Id" type="xs:ID"/>
      <xs:attribute name="Ref" type="xs:IDREF"/>
    </xs:schema>
    <xs:schema elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/SurveyAutomationLauncher">
      <xs:complexType name="SurveyAutomationActivationResponse">
        <xs:sequence>
          <xs:element minOccurs="0" name="Status" nillable="true" type="xs:string"/>
          <xs:element minOccurs="0" name="statusCode" type="xs:boolean"/>
        </xs:sequence>
      </xs:complexType>
      <xs:element name="SurveyAutomationActivationResponse" nillable="true" type="tns:SurveyAutomationActivationResponse"/>
      <xs:complexType name="CustomExceptionHandling">
        <xs:sequence>
          <xs:element minOccurs="0" name="ErrorDetails" nillable="true" type="xs:string"/>
          <xs:element minOccurs="0" name="ErrorMessage" nillable="true" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
      <xs:element name="CustomExceptionHandling" nillable="true" type="tns:CustomExceptionHandling"/>
    </xs:schema>
  </wsdl:types>
  <wsdl:message name="ISurveyAutomationActivation_ActivatingSurveyAutomation_InputMessage">
    <wsdl:part name="parameters" element="tns:ActivatingSurveyAutomation"/>
  </wsdl:message>
  <wsdl:message name="ISurveyAutomationActivation_ActivatingSurveyAutomation_OutputMessage">
    <wsdl:part name="parameters" element="tns:ActivatingSurveyAutomationResponse"/>
  </wsdl:message>
  <wsdl:message name="ISurveyAutomationActivation_ActivatingSurveyAutomation_CustomExceptionHandlingFault_FaultMessage">
    <wsdl:part name="detail" element="q1:CustomExceptionHandling"/>
  </wsdl:message>
  <wsdl:portType name="ISurveyAutomationActivation">
    <wsdl:operation name="ActivatingSurveyAutomation">
      <wsdl:input wsaw:Action="http://tempuri.org/ISurveyAutomationActivation/ActivatingSurveyAutomation" message="tns:ISurveyAutomationActivation_ActivatingSurveyAutomation_InputMessage"/>
      <wsdl:output wsaw:Action="http://tempuri.org/ISurveyAutomationActivation/ActivatingSurveyAutomatio... message="tns:ISurveyAutomationActivation_ActivatingSurveyAutomation_OutputMessage"/>
      <wsdl:fault wsaw:Action="http://tempuri.org/ISurveyAutomationActivation/ActivatingSurveyAutomatio... name="CustomExceptionHandlingFault" message="tns:ISurveyAutomationActivation_ActivatingSurveyAutomation_CustomExceptionHandlingFault_FaultMessage"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="SurveyAutomation" type="tns:ISurveyAutomationActivation">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="ActivatingSurveyAutomation">
      <soap12:operation soapAction="http://tempuri.org/ISurveyAutomationActivation/ActivatingSurveyAutomation" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="CustomExceptionHandlingFault">
        <soap12:fault use="literal" name="CustomExceptionHandlingFault" namespace=""/>
      </wsdl:fault>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="SurveyAutomationActivation">
    <wsdl:port name="SurveyAutomation" binding="tns:SurveyAutomation">
      <soap12:address location="http://localhost/SurveyAutomationActivation.svc"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

Thanks Kishore

1 answer

1
0
-1

We are using WCF Soap (svc) serivce and these are the parameters which we are using :- Service NS : SurveyAutomationActivation Service Name : http://tempuri.org/ Soap Action : http://tempuri.org/ISurveyAutomationActivation/ActivatingSurveyAutomation Port Name : SurveyAutomation End Point Address : http://localhost/SurveyAutomationActivation.svc Binding : http://www.w3.org/2003/05/soap/bindings/HTTP/

  <?xml version="1.0" encoding="utf-8"?>
  <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/">
    <soap:Header/>
    <soap:Body>
      <tem:ActivatingSurveyAutomation/>
    </soap:Body>
  </soap:Envelope>

and even we are serializing the output into json object then also it is giving error

java.lang.reflect.InvocationTargetException org.bonitasoft.engine.bpm.connector.ConnectorExecutionException: USERNAME=install | org.bonitasoft.engine.core.connector.exception.SConnectorException: org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: java.lang.IndexOutOfBoundsException: Index: 1, Size: 0

when i tried the same logic and used asmx web service it is working , kindly tell us what exactly the error is , in this wsdl provided in the last of this comment

Thanks Kishore,

  <wsdl:definitions name="SurveyAutomationActivation" targetNamespace="http://tempuri.org/">
    <wsdl:types>
      <xs:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
        <xs:import namespace="http://schemas.datacontract.org/2004/07/SurveyAutomationLauncher"/>
        <xs:element name="ActivatingSurveyAutomation">
          <xs:complexType>
            <xs:sequence/>
          </xs:complexType>
        </xs:element>
        <xs:element name="ActivatingSurveyAutomationResponse">
          <xs:complexType>
            <xs:sequence>
              <xs:element minOccurs="0" name="ActivatingSurveyAutomationResult" nillable="true" type="q1:SurveyAutomationActivationResponse"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:schema>
      <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/">
        <xs:element name="anyType" nillable="true" type="xs:anyType"/>
        <xs:element name="anyURI" nillable="true" type="xs:anyURI"/>
        <xs:element name="base64Binary" nillable="true" type="xs:base64Binary"/>
        <xs:element name="boolean" nillable="true" type="xs:boolean"/>
        <xs:element name="byte" nillable="true" type="xs:byte"/>
        <xs:element name="dateTime" nillable="true" type="xs:dateTime"/>
        <xs:element name="decimal" nillable="true" type="xs:decimal"/>
        <xs:element name="double" nillable="true" type="xs:double"/>
        <xs:element name="float" nillable="true" type="xs:float"/>
        <xs:element name="int" nillable="true" type="xs:int"/>
        <xs:element name="long" nillable="true" type="xs:long"/>
        <xs:element name="QName" nillable="true" type="xs:QName"/>
        <xs:element name="short" nillable="true" type="xs:short"/>
        <xs:element name="string" nillable="true" type="xs:string"/>
        <xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte"/>
        <xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt"/>
        <xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong"/>
        <xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort"/>
        <xs:element name="char" nillable="true" type="tns:char"/>
        <xs:simpleType name="char">
          <xs:restriction base="xs:int"/>
        </xs:simpleType>
        <xs:element name="duration" nillable="true" type="tns:duration"/>
        <xs:simpleType name="duration">
          <xs:restriction base="xs:duration">
            <xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?"/>
            <xs:minInclusive value="-P10675199DT2H48M5.4775808S"/>
            <xs:maxInclusive value="P10675199DT2H48M5.4775807S"/>
          </xs:restriction>
        </xs:simpleType>
        <xs:element name="guid" nillable="true" type="tns:guid"/>
        <xs:simpleType name="guid">
          <xs:restriction base="xs:string">
            <xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}"/>
          </xs:restriction>
        </xs:simpleType>
        <xs:attribute name="FactoryType" type="xs:QName"/>
        <xs:attribute name="Id" type="xs:ID"/>
        <xs:attribute name="Ref" type="xs:IDREF"/>
      </xs:schema>
      <xs:schema elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/SurveyAutomationLauncher">
        <xs:complexType name="SurveyAutomationActivationResponse">
          <xs:sequence>
            <xs:element minOccurs="0" name="Status" nillable="true" type="xs:string"/>
            <xs:element minOccurs="0" name="statusCode" type="xs:boolean"/>
          </xs:sequence>
        </xs:complexType>
        <xs:element name="SurveyAutomationActivationResponse" nillable="true" type="tns:SurveyAutomationActivationResponse"/>
        <xs:complexType name="CustomExceptionHandling">
          <xs:sequence>
            <xs:element minOccurs="0" name="ErrorDetails" nillable="true" type="xs:string"/>
            <xs:element minOccurs="0" name="ErrorMessage" nillable="true" type="xs:string"/>
          </xs:sequence>
        </xs:complexType>
        <xs:element name="CustomExceptionHandling" nillable="true" type="tns:CustomExceptionHandling"/>
      </xs:schema>
    </wsdl:types>
    <wsdl:message name="ISurveyAutomationActivation_ActivatingSurveyAutomation_InputMessage">
      <wsdl:part name="parameters" element="tns:ActivatingSurveyAutomation"/>
    </wsdl:message>
    <wsdl:message name="ISurveyAutomationActivation_ActivatingSurveyAutomation_OutputMessage">
      <wsdl:part name="parameters" element="tns:ActivatingSurveyAutomationResponse"/>
    </wsdl:message>
    <wsdl:message name="ISurveyAutomationActivation_ActivatingSurveyAutomation_CustomExceptionHandlingFault_FaultMessage">
      <wsdl:part name="detail" element="q1:CustomExceptionHandling"/>
    </wsdl:message>
    <wsdl:portType name="ISurveyAutomationActivation">
      <wsdl:operation name="ActivatingSurveyAutomation">
        <wsdl:input wsaw:Action="http://tempuri.org/ISurveyAutomationActivation/ActivatingSurveyAutomation" message="tns:ISurveyAutomationActivation_ActivatingSurveyAutomation_InputMessage"/>
        <wsdl:output wsaw:Action="http://tempuri.org/ISurveyAutomationActivation/ActivatingSurveyAutomatio... message="tns:ISurveyAutomationActivation_ActivatingSurveyAutomation_OutputMessage"/>
        <wsdl:fault wsaw:Action="http://tempuri.org/ISurveyAutomationActivation/ActivatingSurveyAutomatio... name="CustomExceptionHandlingFault" message="tns:ISurveyAutomationActivation_ActivatingSurveyAutomation_CustomExceptionHandlingFault_FaultMessage"/>
      </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="SurveyAutomation" type="tns:ISurveyAutomationActivation">
      <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="ActivatingSurveyAutomation">
        <soap12:operation soapAction="http://tempuri.org/ISurveyAutomationActivation/ActivatingSurveyAutomation" style="document"/>
        <wsdl:input>
          <soap12:body use="literal"/>
        </wsdl:input>
        <wsdl:output>
          <soap12:body use="literal"/>
        </wsdl:output>
        <wsdl:fault name="CustomExceptionHandlingFault">
          <soap12:fault use="literal" name="CustomExceptionHandlingFault" namespace=""/>
        </wsdl:fault>
      </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="SurveyAutomationActivation">
      <wsdl:port name="SurveyAutomation" binding="tns:SurveyAutomation">
        <soap12:address location="http://localhost/SurveyAutomationActivation.svc"/>
      </wsdl:port>
    </wsdl:service>
  </wsdl:definitions>
Notifications