Webservice PI
Transcript of Webservice PI
7/26/2019 Webservice PI
http://slidepdf.com/reader/full/webservice-pi 1/11
RFC -> XI -> Webservice - A Complete Walkthrough
"Nothing is impossible" is what came to my mind when i fnally ound success with thisscenario running into a "Chequered Flag".
You can download the WSDL o the Webserice !ere
About the WebService :
he WebSerice has di#erent o$erations as ollowing%
&. getState'. getlocation(. getCity). getDistance*. getLatitude+. getLongitude
We will be using the o$eration getDistance in our scenario.
, screenshot o the WSDL in -L S$y is shown below/
he o$eration getDistance has an in$ut that ta0es in two $arameters rom1i$ and to1i$ andreturns getDistance2eturn ie it fnds out the distance between two gien 1i$Codes.
The RFC :
, 2FC is created at the 23( side with the ollowing $arameters/
4m$ort /
F25146 ty$e C!,2&7 5146 ty$e C!,2&7
89$ort/
D4S,:C8 ty$e C!,2&7
Integration Builer ! Design :
We need to 0now the structure o the message that needs to go as a request to the Websericeand also how the Webserice res$onds bac0. his is releent as we need to accom$lish thema$$ing between the 2FC.2equest to S5,6.2equest and S5,6.2es$onse to 2FC.2es$onse.
7/26/2019 Webservice PI
http://slidepdf.com/reader/full/webservice-pi 2/11
Note : Usually when we import the WSDL as an External Defnition, we get the relevant messagesor the request an response stru!tures along with it" See s!reenshot #elow"
$t my frst try i use the messages getDistan!e%equest an getDistan!e%esponse in mymapping #ut later oun out that it wasnt the message stru!ture that the we#servi!e expe!te"
o get the structure o the releant request and res$onse messages you can test the websericewith an editor li0e -L S$y. 2eer this weblog;the testing section in it< or a better understanding
o how to accom$lish the same.
4n our case you can download and o$en the WSDL fle in -L S$y.
5nce we create a new S5,6 request ;-L S$y => S5,6 menu => Create :ew 2equest< and thenselect the o$eration name ;getDistance in our case< we get the request S5,6 structure and oncethe request is sent the resulting is the res$onse structure.
:ow that we hae an idea o the request and res$onse structures or the S5,6 we can $roceed tobuild the design.
&. 4m$ort the 2FC rom 23( into the releant sotware com$onent ersion.
'. Create a Data ty$e D?getDistance as ollows@
7/26/2019 Webservice PI
http://slidepdf.com/reader/full/webservice-pi 3/11
(. Create a essage ty$e getDistance as ollows re$lacing the names$ace tohtt$/33webserices.imacination.com3distance3Distance.Aws
). For the res$onse structure o the S5,6 i created a -SD and im$orted it as a e9ternal defnition.
B9ml ersion"&.7" encoding"4S5=EE*=&">B9s/schema
9mlns/9s"htt$/33www.w(.org3'77&3-LSchema" elementFormDeault"qualifed"attributeFormDeault"unqualifed">B9s/elementname"getDistance2es$onse">B9s/annotation>B9s/documentation>Comment describing yourrootelementB39s/documentation>B39s/annotation>B9s/com$le9y$e>B9s/sequence>B9s/elementname"getDistance2eturn" ty$e"9s/double"3>B39s/sequence>B39s/com$le9y$e>B39s/element>B39s/schema>
*. , message interace ;inbound synchronous< is then created.
7/26/2019 Webservice PI
http://slidepdf.com/reader/full/webservice-pi 4/11
+. a$$ing are done@ the frst being the 2FC request to the S5,6 request ;getDistance< and thesecond the S5,6 res$onse ;getDistance2es$onse the message in the 8D< to the 2FC res$onse.
a$$ing & /
a$$ing ' /
7/26/2019 Webservice PI
http://slidepdf.com/reader/full/webservice-pi 5/11
G. 4nterace ma$$ing = S$eciy the source interace as the 2FC and the target as the inboundsynchronous interace created.
Sae and ,ctiate all the obAects created.
his brings us to the end o the Design.
7/26/2019 Webservice PI
http://slidepdf.com/reader/full/webservice-pi 6/11
RFC -> XI -> WebService - A Complete Walkthrough (Part 2
Conguration /
Assumption /
&. We hae a Husiness system or a Husiness serice ready to use.'. he Sender agreement@ 2eceier agreement @ 2eceier determination and interacedeterimination ste$s will be done by the reader.
here are two ada$ters we need to confgure or this scenario@ a RFC sener aapter anda S#A$ receiver aapter.
For confguring your 2FC sender ada$ter reer this blog which gies you a detailed ste$ by ste$$rocedure.
he S5,6 receier ada$ter needs to be confgured as ollows/
We need to s$eciy the ollowing%
&. Target %rl / htt$/33webserices.imacination.com3distance3Distance.Aws'. Congure $ro&' / 4 your networ0 has a $ro9y setu$ you need to $roide the detaisl o thesame.(. Congure pro&' %ser Authentication / to be s$ecifed in case.). S#A$ Action / 6roide getDistance since that is the o$eration the webserice will use in ourcase.
5nce all o the confguration is done and the obAects are actiated@ we $roceed to the testing $art
7/26/2019 Webservice PI
http://slidepdf.com/reader/full/webservice-pi 7/11
o the scenario.
Testing /
4 hae written a small ,H,6 code or test $ur$ose.
28652 1?8S?2FC?-4?W8HS82I4C8.data/ l?distance ty$e char&7.C,LL FJ:C45:K1?W8HS82I4C8?8S?S!,H1K destination K1?W8HS82I4C8K 8-6524: F25146 K&''''K 5146 K'''''K 46524: D4S,:C8 l?distance.write / KDistance is / K @l?distance.
5nce this $rogram is e9ecuted we get the re$ly rom the Webserice.
, screenshot o S-H?5:4 shows the request and res$onse -L/
Re(uest /
7/26/2019 Webservice PI
http://slidepdf.com/reader/full/webservice-pi 8/11
Response /
and thus this brings us to the end o a successul im$lementation o a 2FC => -4=> Websericescenario. /=<
7/26/2019 Webservice PI
http://slidepdf.com/reader/full/webservice-pi 9/11
!roubleshooti"g - RFC a"# S$AP sce"arios
Heore we $roceed urther 4 must request all those who are at their frst hand confguring the 2FC
sender ada$ter to read the weblog Confguring the Sender 2FC ,da$ter = ste$ by ste$ by i0e. his i beliee is a one o the best weblog addressing the issue o confguring the 2FC senderada$ter.
Note : &n this we#log my !omments will #e on the #asis o the two part we#log %'( )* +& )*We#Servi!e ) $ (omplete Walthrough - .art / 0 .art 1 2" & hope this we#log will hen!e a!t as atrou#leshooting guie or the #eginners trying out that s!enario"
RFC S)ND)R ADA$T)R
*+ The $rogram ID = his is Conusing MMM
N/ Where can 4 fnd the $rogram id
,ns/ Well@ the $rogram id can be anything@ een your name. /=< Hut the catch here is that youshould hae the same in both the 2FC destination and your 2FC ada$ter.
Note: & you have rea the a#ove mentione #log #y 3ie, he has use sdnweblog as the program i an the same is use in the %'( estination an also the %'( aapter
4nteresting read = Nuestion '' o S,6 note G(7EG7
,n e9tract o the same is
"o identiy a -4 2c,da$ter sender channel within the S,6 ateway it is im$ortant that its6rogram 4D is unique within this ateway.So try to aoid using common $hrases as 6rogram 4Dli0e Krcada$terK or Krco-mbK.
o chec0 which 6rogram 4Ds are registered at the S,6 ateway the gateway=monitor can be usedia transaction SW. Select oto => Logged on Clients. 2egistered 2FC=Serers hae a System= y$e o K284S82?6K. he 6rogram 4D o the registered 2FC=Serrer can be ound in column K6nameK. Jnortunately the list within SW only shows the truncated ersion o the 6rogram 4D;column K6 nameK<. o get the ull name@ the details o an entry hae to be selected. ,s analternatie the re$ort 2S8,LL?28?S82I82S can be e9ecuted in transaction S8(E. he out$uto this re$ort will show the ull names o the 6rogram 4D in column K2egistered 6254DK. hisunctionality is also aailable in the unction module WY?28,D?C5::8C8D?SYS8S whichcan be e9ecuted in transaction S8(G."
,+ Application Server-.ate/a'0 an Application Server Service-.ate/a'0 = Where to fndit
C5D8 / SW => oto=> 6arameters => Dis$lay
You will fnd the required ino under ,ttributes. ,$$lication Serer;ateway< is the atewayhostname and ,$$lication Serer Serice;ateway< is the ateway serice.Jsually the ateway serice is sa$gw-- where -- is the system number.
1+ The RFC estination = rouble trouble and loads o trouble MM
a. a0e sure that the 2FC destination is to be created in the 2( systems and not -4.b. 4 in your ada$ter monitoring you fnd a message as KCould not start serer/ Connect to S,6
7/26/2019 Webservice PI
http://slidepdf.com/reader/full/webservice-pi 10/11
gateway ailedK@ then try to re$lace the W!ost ;gateway host< with the 46 o the 2( system.c. Chec0 out the S,6 note G(7EG7 or the F,N on the 2FC ada$ter.
2+ com+sap+aii+aapter+r3c+a3communication+R3cAFW)&ception: senerAgreement not3oun = Chec0 i you hae $roided O as the alue in your $arty or both the sender agreementand the 2FC sender communication channel. ry creating both o them without the O as the alue.
S#A$ R)C)I4)R ADA$T)R
*+ S#A$ Action = ,ction
2e/ 6oint *
4n case your WSDL does not hae a S5,6 ,ction defned ;search or soa$,ction in your WSDL@ itwill gie you the action<@ try with a blan0 S5,6 ,ction in your ,da$ter. 4n case it doesnt succeedthen try the ollowing%
he S5,6 action S5,6 o$eration.
You will fnd it under the tag . 8g. .
o fnd the list o 5$erations in your WSDL try this.5$en the WSDL in a -L 8ditor ;eg. -L S$y<. Clic0 on the Schema3WSDL tab and you will fnd allthe o$erations listed.
See the ollowing screen shot%
in this case getDistance is the action
,+ The Target %R5 = 8hhh@ 89cuse me MMMMM
o fnd the arget J2L search the WSDL or Kwsdlsoa$/address locationK. ,lso re. $oint *
1+ Congure $ro&' = Why should 4
4 your networ0 inoles a $ro9y that details hae to be $roided in the ada$ter. ,lso i the $ro9yinoles an authoriPation@ the 6ro9y Jser ,uthentication details need to be flled in. 8lsea Deliver' )&ception is sure to be raised.
2+ SA$ Note = F,NKs on the S5,6 ada$ter
S,6 :ote / E*+*G
7/26/2019 Webservice PI
http://slidepdf.com/reader/full/webservice-pi 11/11
6+ Aitional Notes = -L S$y users
,n 8asy way o fnding out your web sericeKs right address and S5,6 action using -L S$y is/
&. 4n the menu@ o to S5,6 => Create new S5,6 request'. Hrowse the WSDL fle or enter the ull J2L o the WSDL ;it should be wsdl<(. Select the o$eration you want to access
). ,ter the request has been generated@ go to S5,6@ Change S5,6 request $arameters.
7+ "Deliver' )&ception: invali content t'pe 3or S#A$:T)8T9T;5+"
a. he reason can be the wrong address in your S5,6 ada$ter.
b. What else can 4 do
,s $er deault the S5,6 ada$ter sends the S5,6 message the content ty$e te9t39ml. 4 or somereason it is not doing that then use the messagetransormbean. 4n you ada$ter $roide theollowing%
o to the S5,6 receier communication channel module tab. ,dd the module"localeAbs3,F?odules3essageransormHean" beore the standard module. 6roide the$arameter name Trans3orm+ContentT'pe and alue te&t9&ml
<+ com+sap+aii+a3+ra+ms+api+Deliver')&ception: invali content t'pe 3or S#A$:T)8T9$5AIN
ry contacting the WS team and fnding out the Content y$e e9$ected by them.Jsing the essageransormHean@ the content ty$e can be changed.
=+ ;' content t'pe is sho/ing application9&ml but this is not e&pecte+
Confrm i you hae chec0ed the o$tion "Do not use S5,6 enelo$e". 4 this is chec0ed then thecontent ty$e by deault is a$$lication39ml. 4 the $roblem still $ersist use theessageransormHean to hel$ you out.