6 Replies Latest reply on Jul 10, 2017 2:46 PM by blafond1

    Import Web Service Source (SOAP)

    glastella85

      Dear all,

      I'm trying to create a new data source starting from a wsdl file (it attached here).

      When i'm testing the wsdl file, Teiid Designer validate it but i don't see the endpoints and related bindings.

       

      <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns0="http://ws.wso2.org/dataservice" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://ws.wso2.org/dataservice">
          <wsdl:documentation/>
          <wsdl:types>
              <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://ws.wso2.org/dataservice">
                  <xs:element name="DataServiceFault">
                      <xs:complexType>
                          <xs:sequence>
                              <xs:element name="current_params" type="xs:string"/>
                              <xs:element name="current_request_name" type="xs:string"/>
                              <xs:element name="nested_exception" type="xs:string"/>
                              <xs:element name="source_data_service">
                                  <xs:complexType>
                                      <xs:sequence>
                                          <xs:element name="location" type="xs:string"/>
                                          <xs:element name="default_namespace" type="xs:string"/>
                                          <xs:element name="description" type="xs:string"/>
                                          <xs:element name="data_service_name" type="xs:string"/>
                                      </xs:sequence>
                                  </xs:complexType>
                              </xs:element>
                              <xs:element name="ds_code" type="xs:string"/>
                          </xs:sequence>
                      </xs:complexType>
                  </xs:element>
                  <xs:element name="REQUEST_STATUS" type="xs:string"/>
                  <xs:element name="DATA_SERVICE_RESPONSE">
                      <xs:complexType>
                          <xs:sequence>
                              <xs:any minOccurs="0"/>
                          </xs:sequence>
                      </xs:complexType>
                  </xs:element>
                  <xs:element name="xml_query">
                      <xs:complexType>
                          <xs:sequence/>
                      </xs:complexType>
                  </xs:element>
                  <xs:element name="Projects" type="ns0:Projects"/>
                  <xs:complexType name="Projects">
                      <xs:sequence>
                          <xs:element maxOccurs="unbounded" minOccurs="0" name="Project" type="ns0:Project"/>
                      </xs:sequence>
                  </xs:complexType>
                  <xs:complexType name="Project">
                      <xs:sequence>
                          <xs:element name="idprogetto" nillable="true" type="xs:integer"/>
                          <xs:element name="area" nillable="true" type="xs:string"/>
                          <xs:element name="capofila" nillable="true" type="xs:string"/>
                      </xs:sequence>
                  </xs:complexType>
              </xs:schema>
          </wsdl:types>
          <wsdl:message name="xml_queryRequest">
              <wsdl:part name="parameters" element="ns0:xml_query"/>
          </wsdl:message>
          <wsdl:message name="xml_queryResponse">
              <wsdl:part name="parameters" element="ns0:Projects"/>
          </wsdl:message>
          <wsdl:message name="DataServiceFault">
              <wsdl:part name="parameters" element="ns0:DataServiceFault"/>
          </wsdl:message>
          <wsdl:portType name="CassandraPortType">
              <wsdl:operation name="xml_query">
                  <wsdl:documentation/>
                  <wsdl:input message="ns0:xml_queryRequest" wsaw:Action="urn:xml_query"/>
                  <wsdl:output message="ns0:xml_queryResponse" wsaw:Action="urn:xml_queryResponse"/>
                  <wsdl:fault message="ns0:DataServiceFault" name="DataServiceFault" wsaw:Action="urn:xml_queryDataServiceFault"/>
              </wsdl:operation>
          </wsdl:portType>
          <wsdl:binding name="CassandraSOAP11Binding" type="ns0:CassandraPortType">
              <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
              <wsdl:operation name="xml_query">
                  <soap:operation soapAction="urn:xml_query" style="document"/>
                  <wsdl:input>
                      <soap:body use="literal"/>
                  </wsdl:input>
                  <wsdl:output>
                      <soap:body use="literal"/>
                  </wsdl:output>
                  <wsdl:fault name="DataServiceFault">
                      <soap:fault use="literal" name="DataServiceFault"/>
                  </wsdl:fault>
              </wsdl:operation>
          </wsdl:binding>
          <wsdl:binding name="CassandraSOAP12Binding" type="ns0:CassandraPortType">
              <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
              <wsdl:operation name="xml_query">
                  <soap12:operation soapAction="urn:xml_query" style="document"/>
                  <wsdl:input>
                      <soap12:body use="literal"/>
                  </wsdl:input>
                  <wsdl:output>
                      <soap12:body use="literal"/>
                  </wsdl:output>
                  <wsdl:fault name="DataServiceFault">
                      <soap12:fault use="literal" name="DataServiceFault"/>
                  </wsdl:fault>
              </wsdl:operation>
          </wsdl:binding>
          <wsdl:binding name="CassandraHttpBinding" type="ns0:CassandraPortType">
              <http:binding verb="POST"/>
              <wsdl:operation name="xml_query">
                  <http:operation location="xml_query"/>
                  <wsdl:input>
                      <mime:content type="text/xml" part="parameters"/>
                  </wsdl:input>
                  <wsdl:output>
                      <mime:content type="text/xml" part="parameters"/>
                  </wsdl:output>
              </wsdl:operation>
          </wsdl:binding>
          <wsdl:service name="Cassandra">
              <wsdl:port name="SecureSOAP11Endpoint" binding="ns0:CassandraSOAP11Binding">
                  <soap:address location="https://10.81.53.13:9443/services/Cassandra.SecureSOAP11Endpoint/"/>
              </wsdl:port>
              <wsdl:port name="SOAP11Endpoint" binding="ns0:CassandraSOAP11Binding">
                  <soap:address location="http://10.81.53.13:9763/services/Cassandra.SOAP11Endpoint/"/>
              </wsdl:port>
              <wsdl:port name="SecureSOAP12Endpoint" binding="ns0:CassandraSOAP12Binding">
                  <soap12:address location="https://10.81.53.13:9443/services/Cassandra.SecureSOAP12Endpoint/"/>
              </wsdl:port>
              <wsdl:port name="SOAP12Endpoint" binding="ns0:CassandraSOAP12Binding">
                  <soap12:address location="http://10.81.53.13:9763/services/Cassandra.SOAP12Endpoint/"/>
              </wsdl:port>
              <wsdl:port name="SecureHTTPEndpoint" binding="ns0:CassandraHttpBinding">
                  <http:address location="https://10.81.53.13:9443/services/Cassandra.SecureHTTPEndpoint/"/>
              </wsdl:port>
              <wsdl:port name="HTTPEndpoint" binding="ns0:CassandraHttpBinding">
                  <http:address location="http://10.81.53.13:9763/services/Cassandra.HTTPEndpoint/"/>
              </wsdl:port>
          </wsdl:service>
      </wsdl:definitions>
      

       

      Any help will be greatly appreciated!

       

      Thanks

        • 1. Re: Import Web Service Source (SOAP)
          rareddy

          Are you trying to read from a SOAP source? Can you list the step you took perhaps?

          • 2. Re: Import Web Service Source (SOAP)
            glastella85

            Hi Ramesh,

            thank you for response me.

            Yes, i'm trying to read from SOAP source.

            I'm following the guidelines on Teiid Designer, in particular 'Consume SOAP WEB Service'.

            The creation of WS (SOAP) connection work well (validation and ping OK), but when i'm trying to set WS EndPoint Property i see any endpoint and binding time with an exception 'NoSuchElementException'.

            The used wsdl has been created by WSO2 DSS without axis2 namespace (how you can see above).

            Can you help me??

            thank you so much.

            Giuseppe

            • 3. Re: Import Web Service Source (SOAP)
              rareddy

              are you following Teiid Designer User Guide ?

               

              Can you post the whole exception?

              • 4. Re: Import Web Service Source (SOAP)
                glastella85

                You can see below the exception:

                 

                ERROR {org.apache.axis2.engine.AxisEngine} -  The service cannot be found for the endpoint reference (EPR) /services/Cassandra%3Fwsdl {org.apache.axis2.engine.AxisEngine}

                org.apache.axis2.AxisFault: The service cannot be found for the endpoint reference (EPR) /services/Cassandra%3Fwsdl

                • 5. Re: Import Web Service Source (SOAP)
                  rareddy

                  I believe axis may be used in the Teiid Designer, not in the WSDL. I am not sure of particulars of the issue why Designer is failing. I tried with Dynamic VDB, it also failed for SOAP12 but for that, I logged this JIRA TEIID-4987

                  But SOAP11 might work fine. For that below the "EndPointName" use "SOAP11Endpoint"

                   

                  For this, you need to use a Dynamic VDB like

                   

                  <vdb name="cassandra" version="1">

                      <model visible="true" name="test">

                          <property name="importer.importWSDL" value="true"/>        

                          <source name="cass" translator-name="ws" connection-jndi-name="java:/wsDS"/>

                      </model>

                  </vdb>

                   

                  with resource-adapter in standalone-teiid.xml like

                   

                                  <resource-adapter id="webservice">

                                      <module slot="main" id="org.jboss.teiid.resource-adapter.webservice"/>

                                      <connection-definitions>

                                          <connection-definition class-name="org.teiid.resource.adapter.ws.WSManagedConnectionFactory" jndi-name="java:/wsDS" enabled="true" use-java-context="true" pool-name="wsDS">

                                              <config-property name="Wsdl">/home/rareddy/testing/vdbs/cassandra_wsdl.xml</config-property>

                                              <config-property name="NamespaceUri">http://ws.wso2.org/dataservice</config-property>

                                              <config-property name="ServiceName">Cassandra</config-property>

                                              <config-property name="EndPointName">SOAP12Endpoint</config-property>

                                          </connection-definition>

                                      </connection-definitions>

                                  </resource-adapter>

                   

                  When done, you will see a procedure called "xml_query" which you can use in SQL to execute. It would take XML payload in and XML payload out, which you would need to construct request and parse the response.

                   

                  We will also check why Designer is having an issue too meanwhile.

                  • 6. Re: Import Web Service Source (SOAP)
                    blafond1

                    Can you attach your *.wsdl file to this post?  for some reason copy/pasting my own file.. won't allow the profile wizard to complete without error.