5 Replies Latest reply on May 8, 2015 8:43 AM by shawkins

    Unable to consume web service on DV6.

    sanjay_chaturvedi

      We are migrating our project from eds-5.3 to dv6 when deployed same vdb with webservice I got following:

      java.lang.NullPointerException at org.teiid.translator.ws.BinaryWSProcedureExecution.getOutputParameterValues(BinaryWSProcedureExecution.java:173) at org.teiid.dqp.internal.datamgr.ProcedureBatchHandler.getParameterRow(ProcedureBatchHandler.java:86) [teiid-engine-8.4.1-redhat-2.jar:8.4.1-redhat-2] at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.handleBatch(ConnectorWorkItem.java:353) [teiid-engine-8.4.1-redhat-2.jar:8.4.1-redhat
      We have already defined web service related info in standalone.xml as :
      <resource-adapter id="epsservice"> <module slot="main" id="org.jboss.teiid.resource-adapter.webservice"/> <transaction-support>NoTransaction</transaction-support> <connection-definitions> <connection-definition class-name="org.teiid.resource.adapter.ws.WSManagedConnectionFactory" jndi-name="java:/EPSSP_Source" enabled="true" use-java-context="true" pool-name="teiid-ws-ds"> <config-property name="EndPoint"> <webservice url> </config-property> </connection-definition> </connection-definitions> </resource-adapter>
      Same service we can easily access from EDS-5.3 with -ds.xml: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <connection-factories> <no-tx-connection-factory> <jndi-name>EPSSP_Source</jndi-name> <rar-name>teiid-connector-ws.rar</rar-name> <use-java-context>true</use-java-context> <connection-definition>javax.resource.cci.ConnectionFactory</connection-definition> <jmx-invoker-name>jboss:service=invoker,type=jrmp</jmx-invoker-name> <min-pool-size>0</min-pool-size> <max-pool-size>10</max-pool-size> <blocking-timeout-millis>3000</blocking-timeout-millis> <idle-timeout-minutes>30</idle-timeout-minutes> <prefill>false</prefill> <background-validation>false</background-validation> <background-validation-millis>0</background-validation-millis> <validate-on-match>true</validate-on-match> <use-fast-fail>false</use-fast-fail> <statistics-formatter>org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter</statistics-formatter> <isSameRM-override-value>false</isSameRM-override-value> <allocation-retry>0</allocation-retry> <allocation-retry-wait-millis>5000</allocation-retry-wait-millis> <config-property type="java.lang.String" name="EndPoint"><webservice url></config-property> <config-property type="java.lang.String" name="SecurityType">None</config-property> <config-property type="java.lang.String" name="template-name">connector-ws</config-property> </no-tx-connection-factory> </connection-factories>
      Please note that we have not defined any outputparameter and have exposed simple views. For example : view transformation is like this:(where web service response is XML): SELECT A.Period, A.Department_or_Group, A.Regional_or_Global, A.Validation_Complete, A.Validation_Scheduled, A.Developer_Docs_Required, A.Validation_and_Doc_Review_Pending FROM (EXEC EPSSP_Source.invokeHttp( action =>'GET', request => null, endpoint => 'GetRiskData?type=Model', contentType => 'TRUE' )) AS f, XMLTABLE(XMLNAMESPACES('urn:schemas-microsoft-com:rowset' AS rs, 'uuid:C2F41010-65B3-11d1-A29F-00AA00C14882' AS d, 'uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882' AS s), '/xml/rs:data/row' PASSING XMLPARSE(DOCUMENT f.result WELLFORMED) COLUMNS Period string PATH '@ows_xPeriod_x0020_Date', Department_or_Group string PATH '@ows_Department_x0020_or_x0020_Group_', Regional_or_Global string PATH '@ows_xRegional_x0020_or_x0020_Global', Validation_Complete bigdecimal PATH '@ows_Validation_x0020_Complete', Validation_Scheduled bigdecimal PATH '@ows_Validation_x0020_Scheduled', Developer_Docs_Required bigdecimal PATH '@ows_Developer_x0020_Docs_x0020_Requi', Validation_and_Doc_Review_Pending bigdecimal PATH '@ows_Validation_x0020_and_x0020_Doc_x') AS A

       

      Please assist us: same vdb is working fine on eds-5.3.

        • 1. Re: Unable to consume web service on DV6.
          shawkins

          More than likely this is a mismatch in the metadata for the definition of the invokeHttp procedure.

           

          If should have:

          result, a blob returnvalue

          action, a string input

          request, an object input

          endpoint, a string input

          stream, a boolean input

          content type, a boolean output

           

          you can also log a case if there is an unaccounted for legacy parameter signature that the logic is not accounting for.

          • 2. Re: Unable to consume web service on DV6.
            sanjay_chaturvedi

            As I described above :

            EXEC EPSSP_Source.invokeHttp( action =>'GET', request => null, endpoint => 'GetRiskData?type=Model', contentType => 'TRUE' )) AS f - See more at: https://developer.jboss.org/thread/257707?sr=inbox&ru=4044#sthash.bi9hvVgQ.dpuf yes we have logged a case for this but have not got any solution oriented reply yet.

            • 3. Re: Unable to consume web service on DV6.
              shawkins

              I am referring to the metadata definition of the invokeHttp procedure, not just the call.  You need to see in the model, what it is defined as.  If you make the parameters match the definition above, there should be no issue.

              • 4. Re: Unable to consume web service on DV6.
                sanjay_chaturvedi

                Definitely it is: It is still working perfectly well with EDS-5.3, Its dv6 where we have jars translator-ws-8.4.1-redhat-2.jar. Having issue with dv6 only.

                Capture.JPG

                • 5. Re: Unable to consume web service on DV6.
                  shawkins

                  > content type, a boolean output

                   

                  I meant a string output.

                   

                  Please make your procedure match the above both positionally (result first) and in terms of number of parameters (add the stream parameter before contentType).

                   

                  What happened here is that Teiid Designer did not match the server's expectation for the metadata of the invokeHttp procedure.  Then the procedure definition continued to evolve in ways that were backwards compatible - but only assuming the intended legacy metadata.  There have already been several changes to make the server aware of older forms of the metadata that Designer used, but this could be something that is unaccounted for - or is it possible that you manually modified the procedure metadata?