BPM技術文檔10

You can call a web service witout SR if you have the wsdl file and wsdl link for the webservice.

You can get the wsdl link for a webservice in the t-code wsadmin in SAP.

Once you have the wsdl for webservice of SAP, create a logical destination for that service in the web services navigator.

 

 

you can do the following:

-In the Project Explorer right click on Service Interfaces to import the WebService Definition (Import WSDL)
-Chose “Remote Location” and enter the WSDL-Url of your Webservice
-Follow the wizard…
-Create an automated activity within the ProcessComposer
-Assign the recently imported Service Interface

 

If you have the wsdl, you can import it into your BPM process directly.
Then use it in automated activity with logical name. Last step, you have to implement the logical
name in NWA. Check it out.

 

 

9.5.1    WSDL 文檔結構

WSDL 文檔是利用這些主要的元素來描述某個 web service 的:

元素

定義

<portType>

web service 執行的操作

<message>

web service 使用的消息

<types>

web service 使用的數據類型

<binding>

web service 使用的通信協議

一個 WSDL 文檔的主要結構是類似這樣的:

 

一個 WSDL 文檔的主要結構是類似這樣的:

<definitions>

 

<types>

definition of types……..

</types>

 

<message>

definition of a message….

</message>

 

<portType>

definition of a port…….

</portType>

 

<binding>

definition of a binding….

</binding>

 

</definitions>

WSDL 文檔可包含其它的元素,比如 extension 元素,以及一個 service 元素,此元素可把若干個 web services 的定義組合在一個單一的 WSDL 文檔中。

9.5.2    WSDL 端口

<portType> 元素是最重要的 WSDL 元素。

它可描述一個 web service、可被執行的操作,以及相關的消息。

可以把 <portType> 元素比作傳統編程語言中的一個函數庫(或一個模塊、或一個類)。

9.5.3    WSDL 消息

<message> 元素定義一個操作的數據元素。

每個消息均由一個或多個部件組成。可以把這些部件比作傳統編程語言中一個函數調用的參數。

9.5.4    WSDL types

<types> 元素定義 web service 使用的數據類型。

為了最大程度的平台中立性,WSDL 使用 XML Schema 語法來定義數據類型。

9.5.5    WSDL Bindings

<binding> 元素為每個端口定義消息格式和協議細節。

 

9.5.6    總結

9.5.6.1    Port type 中的參數Multiplicity定義

在port type的opertion的參數中,可以定義參數的multiplicity類型,若設為1…N或0…N,在在啟動流程時,該參數的數量可動態創建。如下圖所示:

 

9.5.6.2    如何檢查web service是否可用?

    First of all make sure that the providing system is up and running.

then

    Check by WSDL

    Log on to the WS Navigator as a system administrator (http://host:port/wsnavigator).

    Search for Service Interfaces by WSDL.

    Copy the WSDL URL into the input box & click ‘Next’.

    Select the correct operation & click ‘Next’.

    Specify the input parameters & click ‘Next’.

    Optional: Specify correct credentials if prompted for.

    Check if the result is returned correctly or if some error messages were supplied by the back end.

or

    Check by Logical Destination:

    Log on to the WS Navigator as a system administrator (http://host:port/wsnavigator).

    Search for Service Interfaces by Logical Destination (the one used in the Automated Activity).

    Select the correct one & hit ‘Next’.

    Select the correct operation & hit ‘Next’.

    Specify the input parameters & hit ‘Next’.

    Optional: Specify correct credentials if prompted for.

    Check if the result is returned correctly or if some error messages were supplied by the back end.

9.5.6.3    生成的接口

若compontent名稱為AAAA,則若定義了該component的component interface,則會生成一個一個接口,接口名為IExternal{AAAA}Interface,給接口繼承自標準接口IWDExternalControllerInterface,參見8.1.1

 

 

 

10    實用類、接口

10.1    Class WDValueServices

java.lang.Object


			


				com.sap.tc.webdynpro.progmodel.api.WDValueServices
			

Helper class to create some special value sets.

This class is part of the Web Dynpro API, so applications may reference it or call any method of this type, but they must not subclass it.

 

 

11    連接外部數據庫

首先在NWA中配置數據庫連接。

 

如MySQL的DRIVER為:com.mysql.jdbc.Driver

以下文章點擊率最高

Loading…

     

如果這文章對你有幫助,請掃左上角微信支付-支付寶,給於打賞,以助博客運營