Upload
lamdat
View
214
Download
1
Embed Size (px)
Citation preview
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 1
Consuming the External Web
Service in SAP Environment
Applies to
SAP EHP 1 for SAP NetWeaver 70 For more information visit the ABAP homepage
Summary
This document focuses on the steps for the consumption of external web service (a freely available web service from internet) into SAP environment It will also focus on the basic troubleshooting while consuming the external web service
Author Animesh Sundriyal
Company ITC Infotech Limited
Created on 3 December 2010
Author Bio
I am SAP ABAP and Webdynpro consultant with 3 years and 10 months of experience currently working in the integration of ABAP Webdnpro and MDM
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 2
Table of Contents
Overview 3
Illustration 3 PROGRAM 27
Troubleshooting 29
Related Content 30
Disclaimer and Liability Notice 31
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 3
Overview
Lets try using an external webservice into the SAP platform By external webservice I mean the webservice which are hosted from the foreign system other than the system in which we are trying to consume the webservice Let me take the example from the internet by using a freely available
Illustration
Lets open the website httpwwwwebservicexnetwsdefaultaspx from where we take the wsdl specification of a freely available webservice currency convertor
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 4
Now lets see the XML specification of the Currency Convertor Webservice and we can easily make out that multiple bindings are present with the multiple ports Lets keep the operation
ltwsdloperation name=ConversionRategt and the respective binding
ltwsdlbinding name=CurrencyConvertorSoap type=tnsCurrencyConvertorSoapgt and the respective port
ltwsdlport name=CurrencyConvertorSoap binding=tnsCurrencyConvertorSoapgt
I mean copy the WSDL file and edit it in a notepad keep the parts which are mentioned above and remove the following Finally save it with the extention ldquowsdlrdquo
ltxml version=10 encoding=utf-8 gt
- ltwsdldefinitions xmlnssoap=httpschemasxmlsoaporgwsdlsoap
xmlnstm=httpmicrosoftcomwsdlmimetextMatching
xmlnssoapenc=httpschemasxmlsoaporgsoapencoding
xmlnsmime=httpschemasxmlsoaporgwsdlmime
xmlnstns=httpwwwwebserviceXNET
xmlnss=httpwwww3org2001XMLSchema
xmlnssoap12=httpschemasxmlsoaporgwsdlsoap12
xmlnshttp=httpschemasxmlsoaporgwsdlhttp
targetNamespace=httpwwwwebserviceXNET
xmlnswsdl=httpschemasxmlsoaporgwsdlgt
- ltwsdltypesgt
- ltsschema elementFormDefault=qualified
targetNamespace=httpwwwwebserviceXNETgt
- ltselement name=ConversionRategt
- ltscomplexTypegt
- ltssequencegt
ltselement minOccurs=1 maxOccurs=1 name=FromCurrency type=tnsCurrency gt
ltselement minOccurs=1 maxOccurs=1 name=ToCurrency type=tnsCurrency gt
ltssequencegt
ltscomplexTypegt
ltselementgt
- ltssimpleType name=Currencygt
- ltsrestriction base=sstringgt
ltsenumeration value=AFA gt
ltsenumeration value=ALL gt
ltsenumeration value=DZD gt
ltsenumeration value=ARS gt
ltsenumeration value=AWG gt
ltsenumeration value=AUD gt
ltsenumeration value=BSD gt
ltsenumeration value=BHD gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 5
ltsenumeration value=BDT gt
ltsenumeration value=BBD gt
ltsenumeration value=BZD gt
ltsenumeration value=BMD gt
ltsenumeration value=BTN gt
ltsenumeration value=BOB gt
ltsenumeration value=BWP gt
ltsenumeration value=BRL gt
ltsenumeration value=GBP gt
ltsenumeration value=BND gt
ltsenumeration value=BIF gt
ltsenumeration value=XOF gt
ltsenumeration value=XAF gt
ltsenumeration value=KHR gt
ltsenumeration value=CAD gt
ltsenumeration value=CVE gt
ltsenumeration value=KYD gt
ltsenumeration value=CLP gt
ltsenumeration value=CNY gt
ltsenumeration value=COP gt
ltsenumeration value=KMF gt
ltsenumeration value=CRC gt
ltsenumeration value=HRK gt
ltsenumeration value=CUP gt
ltsenumeration value=CYP gt
ltsenumeration value=CZK gt
ltsenumeration value=DKK gt
ltsenumeration value=DJF gt
ltsenumeration value=DOP gt
ltsenumeration value=XCD gt
ltsenumeration value=EGP gt
ltsenumeration value=SVC gt
ltsenumeration value=EEK gt
ltsenumeration value=ETB gt
ltsenumeration value=EUR gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 6
ltsenumeration value=FKP gt
ltsenumeration value=GMD gt
ltsenumeration value=GHC gt
ltsenumeration value=GIP gt
ltsenumeration value=XAU gt
ltsenumeration value=GTQ gt
ltsenumeration value=GNF gt
ltsenumeration value=GYD gt
ltsenumeration value=HTG gt
ltsenumeration value=HNL gt
ltsenumeration value=HKD gt
ltsenumeration value=HUF gt
ltsenumeration value=ISK gt
ltsenumeration value=INR gt
ltsenumeration value=IDR gt
ltsenumeration value=IQD gt
ltsenumeration value=ILS gt
ltsenumeration value=JMD gt
ltsenumeration value=JPY gt
ltsenumeration value=JOD gt
ltsenumeration value=KZT gt
ltsenumeration value=KES gt
ltsenumeration value=KRW gt
ltsenumeration value=KWD gt
ltsenumeration value=LAK gt
ltsenumeration value=LVL gt
ltsenumeration value=LBP gt
ltsenumeration value=LSL gt
ltsenumeration value=LRD gt
ltsenumeration value=LYD gt
ltsenumeration value=LTL gt
ltsenumeration value=MOP gt
ltsenumeration value=MKD gt
ltsenumeration value=MGF gt
ltsenumeration value=MWK gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 7
ltsenumeration value=MYR gt
ltsenumeration value=MVR gt
ltsenumeration value=MTL gt
ltsenumeration value=MRO gt
ltsenumeration value=MUR gt
ltsenumeration value=MXN gt
ltsenumeration value=MDL gt
ltsenumeration value=MNT gt
ltsenumeration value=MAD gt
ltsenumeration value=MZM gt
ltsenumeration value=MMK gt
ltsenumeration value=NAD gt
ltsenumeration value=NPR gt
ltsenumeration value=ANG gt
ltsenumeration value=NZD gt
ltsenumeration value=NIO gt
ltsenumeration value=NGN gt
ltsenumeration value=KPW gt
ltsenumeration value=NOK gt
ltsenumeration value=OMR gt
ltsenumeration value=XPF gt
ltsenumeration value=PKR gt
ltsenumeration value=XPD gt
ltsenumeration value=PAB gt
ltsenumeration value=PGK gt
ltsenumeration value=PYG gt
ltsenumeration value=PEN gt
ltsenumeration value=PHP gt
ltsenumeration value=XPT gt
ltsenumeration value=PLN gt
ltsenumeration value=QAR gt
ltsenumeration value=ROL gt
ltsenumeration value=RUB gt
ltsenumeration value=WST gt
ltsenumeration value=STD gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 8
ltsenumeration value=SAR gt
ltsenumeration value=SCR gt
ltsenumeration value=SLL gt
ltsenumeration value=XAG gt
ltsenumeration value=SGD gt
ltsenumeration value=SKK gt
ltsenumeration value=SIT gt
ltsenumeration value=SBD gt
ltsenumeration value=SOS gt
ltsenumeration value=ZAR gt
ltsenumeration value=LKR gt
ltsenumeration value=SHP gt
ltsenumeration value=SDD gt
ltsenumeration value=SRG gt
ltsenumeration value=SZL gt
ltsenumeration value=SEK gt
ltsenumeration value=CHF gt
ltsenumeration value=SYP gt
ltsenumeration value=TWD gt
ltsenumeration value=TZS gt
ltsenumeration value=THB gt
ltsenumeration value=TOP gt
ltsenumeration value=TTD gt
ltsenumeration value=TND gt
ltsenumeration value=TRL gt
ltsenumeration value=USD gt
ltsenumeration value=AED gt
ltsenumeration value=UGX gt
ltsenumeration value=UAH gt
ltsenumeration value=UYU gt
ltsenumeration value=VUV gt
ltsenumeration value=VEB gt
ltsenumeration value=VND gt
ltsenumeration value=YER gt
ltsenumeration value=YUM gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 9
ltsenumeration value=ZMK gt
ltsenumeration value=ZWD gt
ltsenumeration value=TRY gt
ltsrestrictiongt
ltssimpleTypegt
- ltselement name=ConversionRateResponsegt
- ltscomplexTypegt
- ltssequencegt
ltselement minOccurs=1 maxOccurs=1 name=ConversionRateResult type=sdouble
gt
ltssequencegt
ltscomplexTypegt
ltselementgt
ltselement name=double type=sdouble gt
ltsschemagt
ltwsdltypesgt
- ltwsdlmessage name=ConversionRateSoapIngt
ltwsdlpart name=parameters element=tnsConversionRate gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateSoapOutgt
ltwsdlpart name=parameters element=tnsConversionRateResponse gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpGetIngt
ltwsdlpart name=FromCurrency type=sstring gt
ltwsdlpart name=ToCurrency type=sstring gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpGetOutgt
ltwsdlpart name=Body element=tnsdouble gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpPostIngt
ltwsdlpart name=FromCurrency type=sstring gt
ltwsdlpart name=ToCurrency type=sstring gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpPostOutgt
ltwsdlpart name=Body element=tnsdouble gt
ltwsdlmessagegt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 10
- ltwsdlportType name=CurrencyConvertorSoapgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 11
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateSoapIn gt
ltwsdloutput message=tnsConversionRateSoapOut gt
ltwsdloperationgt
ltwsdlportTypegt
------------Start Removing The Operarion from here-------------
- ltwsdlportType name=CurrencyConvertorHttpGetgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 12
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpGetIn gt
ltwsdloutput message=tnsConversionRateHttpGetOut gt
ltwsdloperationgt
ltwsdlportTypegt
- ltwsdlportType name=CurrencyConvertorHttpPostgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 13
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpPostIn gt
ltwsdloutput message=tnsConversionRateHttpPostOut gt
ltwsdloperationgt
ltwsdlportTypegt
--------------------Remove Operation Up to here------------------
- ltwsdlbinding name=CurrencyConvertorSoap type=tnsCurrencyConvertorSoapgt
ltsoapbinding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoapoperation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoapbody use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoapbody use=literal gt
ltwsdloutputgt
ltwsdloperationgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 14
ltwsdlbindinggt
---------------Start Removing The Binding from Here-------------
- ltwsdlbinding name=CurrencyConvertorSoap12 type=tnsCurrencyConvertorSoapgt
ltsoap12binding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoap12operation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoap12body use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoap12body use=literal gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpGet type=tnsCurrencyConvertorHttpGetgt
lthttpbinding verb=GET gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
lthttpurlEncoded gt
ltwsdlinputgt
- ltwsdloutputgt
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpPost
type=tnsCurrencyConvertorHttpPostgt
lthttpbinding verb=POST gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
ltmimecontent type=applicationx-www-form-urlencoded gt
ltwsdlinputgt
- ltwsdloutputgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 15
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
---------------------Remove Binding Upto Here--------------------
- ltwsdlservice name=CurrencyConvertorgt
- ltwsdlport name=CurrencyConvertorSoap binding=tnsCurrencyConvertorSoapgt
ltsoapaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------Start Removing The PORT from Here------------------
- ltwsdlport name=CurrencyConvertorSoap12 binding=tnsCurrencyConvertorSoap12gt
ltsoap12address location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpGet binding=tnsCurrencyConvertorHttpGetgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpPost
binding=tnsCurrencyConvertorHttpPostgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------------------Remove Port Upto Here----------------------
ltwsdlservicegt
ltwsdldefinitionsgt
So now the initial preparation is over and name the WSDL file as testCurrencyconverterwsdl
Login into the SAP system and we have to perform basically two jobs to use the service offered by the Currency Convertor webservice
The creation of consumer proxy
Logical endpoint creation in SOAMANAGER for the consumer proxy
Open SE80 transaction and follow the steps shown in the screenshot below to create consumer proxy
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 16
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 17
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 18
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 19
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 20
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 21
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 22
Now we go to SOAMANAGER and create a logical end point for the consumer proxy Follow the screenshots for the same
SOAMANGER opens the transaction in a browser perform the below mentioned steps
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 2
Table of Contents
Overview 3
Illustration 3 PROGRAM 27
Troubleshooting 29
Related Content 30
Disclaimer and Liability Notice 31
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 3
Overview
Lets try using an external webservice into the SAP platform By external webservice I mean the webservice which are hosted from the foreign system other than the system in which we are trying to consume the webservice Let me take the example from the internet by using a freely available
Illustration
Lets open the website httpwwwwebservicexnetwsdefaultaspx from where we take the wsdl specification of a freely available webservice currency convertor
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 4
Now lets see the XML specification of the Currency Convertor Webservice and we can easily make out that multiple bindings are present with the multiple ports Lets keep the operation
ltwsdloperation name=ConversionRategt and the respective binding
ltwsdlbinding name=CurrencyConvertorSoap type=tnsCurrencyConvertorSoapgt and the respective port
ltwsdlport name=CurrencyConvertorSoap binding=tnsCurrencyConvertorSoapgt
I mean copy the WSDL file and edit it in a notepad keep the parts which are mentioned above and remove the following Finally save it with the extention ldquowsdlrdquo
ltxml version=10 encoding=utf-8 gt
- ltwsdldefinitions xmlnssoap=httpschemasxmlsoaporgwsdlsoap
xmlnstm=httpmicrosoftcomwsdlmimetextMatching
xmlnssoapenc=httpschemasxmlsoaporgsoapencoding
xmlnsmime=httpschemasxmlsoaporgwsdlmime
xmlnstns=httpwwwwebserviceXNET
xmlnss=httpwwww3org2001XMLSchema
xmlnssoap12=httpschemasxmlsoaporgwsdlsoap12
xmlnshttp=httpschemasxmlsoaporgwsdlhttp
targetNamespace=httpwwwwebserviceXNET
xmlnswsdl=httpschemasxmlsoaporgwsdlgt
- ltwsdltypesgt
- ltsschema elementFormDefault=qualified
targetNamespace=httpwwwwebserviceXNETgt
- ltselement name=ConversionRategt
- ltscomplexTypegt
- ltssequencegt
ltselement minOccurs=1 maxOccurs=1 name=FromCurrency type=tnsCurrency gt
ltselement minOccurs=1 maxOccurs=1 name=ToCurrency type=tnsCurrency gt
ltssequencegt
ltscomplexTypegt
ltselementgt
- ltssimpleType name=Currencygt
- ltsrestriction base=sstringgt
ltsenumeration value=AFA gt
ltsenumeration value=ALL gt
ltsenumeration value=DZD gt
ltsenumeration value=ARS gt
ltsenumeration value=AWG gt
ltsenumeration value=AUD gt
ltsenumeration value=BSD gt
ltsenumeration value=BHD gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 5
ltsenumeration value=BDT gt
ltsenumeration value=BBD gt
ltsenumeration value=BZD gt
ltsenumeration value=BMD gt
ltsenumeration value=BTN gt
ltsenumeration value=BOB gt
ltsenumeration value=BWP gt
ltsenumeration value=BRL gt
ltsenumeration value=GBP gt
ltsenumeration value=BND gt
ltsenumeration value=BIF gt
ltsenumeration value=XOF gt
ltsenumeration value=XAF gt
ltsenumeration value=KHR gt
ltsenumeration value=CAD gt
ltsenumeration value=CVE gt
ltsenumeration value=KYD gt
ltsenumeration value=CLP gt
ltsenumeration value=CNY gt
ltsenumeration value=COP gt
ltsenumeration value=KMF gt
ltsenumeration value=CRC gt
ltsenumeration value=HRK gt
ltsenumeration value=CUP gt
ltsenumeration value=CYP gt
ltsenumeration value=CZK gt
ltsenumeration value=DKK gt
ltsenumeration value=DJF gt
ltsenumeration value=DOP gt
ltsenumeration value=XCD gt
ltsenumeration value=EGP gt
ltsenumeration value=SVC gt
ltsenumeration value=EEK gt
ltsenumeration value=ETB gt
ltsenumeration value=EUR gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 6
ltsenumeration value=FKP gt
ltsenumeration value=GMD gt
ltsenumeration value=GHC gt
ltsenumeration value=GIP gt
ltsenumeration value=XAU gt
ltsenumeration value=GTQ gt
ltsenumeration value=GNF gt
ltsenumeration value=GYD gt
ltsenumeration value=HTG gt
ltsenumeration value=HNL gt
ltsenumeration value=HKD gt
ltsenumeration value=HUF gt
ltsenumeration value=ISK gt
ltsenumeration value=INR gt
ltsenumeration value=IDR gt
ltsenumeration value=IQD gt
ltsenumeration value=ILS gt
ltsenumeration value=JMD gt
ltsenumeration value=JPY gt
ltsenumeration value=JOD gt
ltsenumeration value=KZT gt
ltsenumeration value=KES gt
ltsenumeration value=KRW gt
ltsenumeration value=KWD gt
ltsenumeration value=LAK gt
ltsenumeration value=LVL gt
ltsenumeration value=LBP gt
ltsenumeration value=LSL gt
ltsenumeration value=LRD gt
ltsenumeration value=LYD gt
ltsenumeration value=LTL gt
ltsenumeration value=MOP gt
ltsenumeration value=MKD gt
ltsenumeration value=MGF gt
ltsenumeration value=MWK gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 7
ltsenumeration value=MYR gt
ltsenumeration value=MVR gt
ltsenumeration value=MTL gt
ltsenumeration value=MRO gt
ltsenumeration value=MUR gt
ltsenumeration value=MXN gt
ltsenumeration value=MDL gt
ltsenumeration value=MNT gt
ltsenumeration value=MAD gt
ltsenumeration value=MZM gt
ltsenumeration value=MMK gt
ltsenumeration value=NAD gt
ltsenumeration value=NPR gt
ltsenumeration value=ANG gt
ltsenumeration value=NZD gt
ltsenumeration value=NIO gt
ltsenumeration value=NGN gt
ltsenumeration value=KPW gt
ltsenumeration value=NOK gt
ltsenumeration value=OMR gt
ltsenumeration value=XPF gt
ltsenumeration value=PKR gt
ltsenumeration value=XPD gt
ltsenumeration value=PAB gt
ltsenumeration value=PGK gt
ltsenumeration value=PYG gt
ltsenumeration value=PEN gt
ltsenumeration value=PHP gt
ltsenumeration value=XPT gt
ltsenumeration value=PLN gt
ltsenumeration value=QAR gt
ltsenumeration value=ROL gt
ltsenumeration value=RUB gt
ltsenumeration value=WST gt
ltsenumeration value=STD gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 8
ltsenumeration value=SAR gt
ltsenumeration value=SCR gt
ltsenumeration value=SLL gt
ltsenumeration value=XAG gt
ltsenumeration value=SGD gt
ltsenumeration value=SKK gt
ltsenumeration value=SIT gt
ltsenumeration value=SBD gt
ltsenumeration value=SOS gt
ltsenumeration value=ZAR gt
ltsenumeration value=LKR gt
ltsenumeration value=SHP gt
ltsenumeration value=SDD gt
ltsenumeration value=SRG gt
ltsenumeration value=SZL gt
ltsenumeration value=SEK gt
ltsenumeration value=CHF gt
ltsenumeration value=SYP gt
ltsenumeration value=TWD gt
ltsenumeration value=TZS gt
ltsenumeration value=THB gt
ltsenumeration value=TOP gt
ltsenumeration value=TTD gt
ltsenumeration value=TND gt
ltsenumeration value=TRL gt
ltsenumeration value=USD gt
ltsenumeration value=AED gt
ltsenumeration value=UGX gt
ltsenumeration value=UAH gt
ltsenumeration value=UYU gt
ltsenumeration value=VUV gt
ltsenumeration value=VEB gt
ltsenumeration value=VND gt
ltsenumeration value=YER gt
ltsenumeration value=YUM gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 9
ltsenumeration value=ZMK gt
ltsenumeration value=ZWD gt
ltsenumeration value=TRY gt
ltsrestrictiongt
ltssimpleTypegt
- ltselement name=ConversionRateResponsegt
- ltscomplexTypegt
- ltssequencegt
ltselement minOccurs=1 maxOccurs=1 name=ConversionRateResult type=sdouble
gt
ltssequencegt
ltscomplexTypegt
ltselementgt
ltselement name=double type=sdouble gt
ltsschemagt
ltwsdltypesgt
- ltwsdlmessage name=ConversionRateSoapIngt
ltwsdlpart name=parameters element=tnsConversionRate gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateSoapOutgt
ltwsdlpart name=parameters element=tnsConversionRateResponse gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpGetIngt
ltwsdlpart name=FromCurrency type=sstring gt
ltwsdlpart name=ToCurrency type=sstring gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpGetOutgt
ltwsdlpart name=Body element=tnsdouble gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpPostIngt
ltwsdlpart name=FromCurrency type=sstring gt
ltwsdlpart name=ToCurrency type=sstring gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpPostOutgt
ltwsdlpart name=Body element=tnsdouble gt
ltwsdlmessagegt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 10
- ltwsdlportType name=CurrencyConvertorSoapgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 11
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateSoapIn gt
ltwsdloutput message=tnsConversionRateSoapOut gt
ltwsdloperationgt
ltwsdlportTypegt
------------Start Removing The Operarion from here-------------
- ltwsdlportType name=CurrencyConvertorHttpGetgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 12
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpGetIn gt
ltwsdloutput message=tnsConversionRateHttpGetOut gt
ltwsdloperationgt
ltwsdlportTypegt
- ltwsdlportType name=CurrencyConvertorHttpPostgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 13
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpPostIn gt
ltwsdloutput message=tnsConversionRateHttpPostOut gt
ltwsdloperationgt
ltwsdlportTypegt
--------------------Remove Operation Up to here------------------
- ltwsdlbinding name=CurrencyConvertorSoap type=tnsCurrencyConvertorSoapgt
ltsoapbinding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoapoperation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoapbody use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoapbody use=literal gt
ltwsdloutputgt
ltwsdloperationgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 14
ltwsdlbindinggt
---------------Start Removing The Binding from Here-------------
- ltwsdlbinding name=CurrencyConvertorSoap12 type=tnsCurrencyConvertorSoapgt
ltsoap12binding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoap12operation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoap12body use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoap12body use=literal gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpGet type=tnsCurrencyConvertorHttpGetgt
lthttpbinding verb=GET gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
lthttpurlEncoded gt
ltwsdlinputgt
- ltwsdloutputgt
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpPost
type=tnsCurrencyConvertorHttpPostgt
lthttpbinding verb=POST gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
ltmimecontent type=applicationx-www-form-urlencoded gt
ltwsdlinputgt
- ltwsdloutputgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 15
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
---------------------Remove Binding Upto Here--------------------
- ltwsdlservice name=CurrencyConvertorgt
- ltwsdlport name=CurrencyConvertorSoap binding=tnsCurrencyConvertorSoapgt
ltsoapaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------Start Removing The PORT from Here------------------
- ltwsdlport name=CurrencyConvertorSoap12 binding=tnsCurrencyConvertorSoap12gt
ltsoap12address location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpGet binding=tnsCurrencyConvertorHttpGetgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpPost
binding=tnsCurrencyConvertorHttpPostgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------------------Remove Port Upto Here----------------------
ltwsdlservicegt
ltwsdldefinitionsgt
So now the initial preparation is over and name the WSDL file as testCurrencyconverterwsdl
Login into the SAP system and we have to perform basically two jobs to use the service offered by the Currency Convertor webservice
The creation of consumer proxy
Logical endpoint creation in SOAMANAGER for the consumer proxy
Open SE80 transaction and follow the steps shown in the screenshot below to create consumer proxy
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 16
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 17
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 18
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 19
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 20
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 21
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 22
Now we go to SOAMANAGER and create a logical end point for the consumer proxy Follow the screenshots for the same
SOAMANGER opens the transaction in a browser perform the below mentioned steps
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 3
Overview
Lets try using an external webservice into the SAP platform By external webservice I mean the webservice which are hosted from the foreign system other than the system in which we are trying to consume the webservice Let me take the example from the internet by using a freely available
Illustration
Lets open the website httpwwwwebservicexnetwsdefaultaspx from where we take the wsdl specification of a freely available webservice currency convertor
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 4
Now lets see the XML specification of the Currency Convertor Webservice and we can easily make out that multiple bindings are present with the multiple ports Lets keep the operation
ltwsdloperation name=ConversionRategt and the respective binding
ltwsdlbinding name=CurrencyConvertorSoap type=tnsCurrencyConvertorSoapgt and the respective port
ltwsdlport name=CurrencyConvertorSoap binding=tnsCurrencyConvertorSoapgt
I mean copy the WSDL file and edit it in a notepad keep the parts which are mentioned above and remove the following Finally save it with the extention ldquowsdlrdquo
ltxml version=10 encoding=utf-8 gt
- ltwsdldefinitions xmlnssoap=httpschemasxmlsoaporgwsdlsoap
xmlnstm=httpmicrosoftcomwsdlmimetextMatching
xmlnssoapenc=httpschemasxmlsoaporgsoapencoding
xmlnsmime=httpschemasxmlsoaporgwsdlmime
xmlnstns=httpwwwwebserviceXNET
xmlnss=httpwwww3org2001XMLSchema
xmlnssoap12=httpschemasxmlsoaporgwsdlsoap12
xmlnshttp=httpschemasxmlsoaporgwsdlhttp
targetNamespace=httpwwwwebserviceXNET
xmlnswsdl=httpschemasxmlsoaporgwsdlgt
- ltwsdltypesgt
- ltsschema elementFormDefault=qualified
targetNamespace=httpwwwwebserviceXNETgt
- ltselement name=ConversionRategt
- ltscomplexTypegt
- ltssequencegt
ltselement minOccurs=1 maxOccurs=1 name=FromCurrency type=tnsCurrency gt
ltselement minOccurs=1 maxOccurs=1 name=ToCurrency type=tnsCurrency gt
ltssequencegt
ltscomplexTypegt
ltselementgt
- ltssimpleType name=Currencygt
- ltsrestriction base=sstringgt
ltsenumeration value=AFA gt
ltsenumeration value=ALL gt
ltsenumeration value=DZD gt
ltsenumeration value=ARS gt
ltsenumeration value=AWG gt
ltsenumeration value=AUD gt
ltsenumeration value=BSD gt
ltsenumeration value=BHD gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 5
ltsenumeration value=BDT gt
ltsenumeration value=BBD gt
ltsenumeration value=BZD gt
ltsenumeration value=BMD gt
ltsenumeration value=BTN gt
ltsenumeration value=BOB gt
ltsenumeration value=BWP gt
ltsenumeration value=BRL gt
ltsenumeration value=GBP gt
ltsenumeration value=BND gt
ltsenumeration value=BIF gt
ltsenumeration value=XOF gt
ltsenumeration value=XAF gt
ltsenumeration value=KHR gt
ltsenumeration value=CAD gt
ltsenumeration value=CVE gt
ltsenumeration value=KYD gt
ltsenumeration value=CLP gt
ltsenumeration value=CNY gt
ltsenumeration value=COP gt
ltsenumeration value=KMF gt
ltsenumeration value=CRC gt
ltsenumeration value=HRK gt
ltsenumeration value=CUP gt
ltsenumeration value=CYP gt
ltsenumeration value=CZK gt
ltsenumeration value=DKK gt
ltsenumeration value=DJF gt
ltsenumeration value=DOP gt
ltsenumeration value=XCD gt
ltsenumeration value=EGP gt
ltsenumeration value=SVC gt
ltsenumeration value=EEK gt
ltsenumeration value=ETB gt
ltsenumeration value=EUR gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 6
ltsenumeration value=FKP gt
ltsenumeration value=GMD gt
ltsenumeration value=GHC gt
ltsenumeration value=GIP gt
ltsenumeration value=XAU gt
ltsenumeration value=GTQ gt
ltsenumeration value=GNF gt
ltsenumeration value=GYD gt
ltsenumeration value=HTG gt
ltsenumeration value=HNL gt
ltsenumeration value=HKD gt
ltsenumeration value=HUF gt
ltsenumeration value=ISK gt
ltsenumeration value=INR gt
ltsenumeration value=IDR gt
ltsenumeration value=IQD gt
ltsenumeration value=ILS gt
ltsenumeration value=JMD gt
ltsenumeration value=JPY gt
ltsenumeration value=JOD gt
ltsenumeration value=KZT gt
ltsenumeration value=KES gt
ltsenumeration value=KRW gt
ltsenumeration value=KWD gt
ltsenumeration value=LAK gt
ltsenumeration value=LVL gt
ltsenumeration value=LBP gt
ltsenumeration value=LSL gt
ltsenumeration value=LRD gt
ltsenumeration value=LYD gt
ltsenumeration value=LTL gt
ltsenumeration value=MOP gt
ltsenumeration value=MKD gt
ltsenumeration value=MGF gt
ltsenumeration value=MWK gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 7
ltsenumeration value=MYR gt
ltsenumeration value=MVR gt
ltsenumeration value=MTL gt
ltsenumeration value=MRO gt
ltsenumeration value=MUR gt
ltsenumeration value=MXN gt
ltsenumeration value=MDL gt
ltsenumeration value=MNT gt
ltsenumeration value=MAD gt
ltsenumeration value=MZM gt
ltsenumeration value=MMK gt
ltsenumeration value=NAD gt
ltsenumeration value=NPR gt
ltsenumeration value=ANG gt
ltsenumeration value=NZD gt
ltsenumeration value=NIO gt
ltsenumeration value=NGN gt
ltsenumeration value=KPW gt
ltsenumeration value=NOK gt
ltsenumeration value=OMR gt
ltsenumeration value=XPF gt
ltsenumeration value=PKR gt
ltsenumeration value=XPD gt
ltsenumeration value=PAB gt
ltsenumeration value=PGK gt
ltsenumeration value=PYG gt
ltsenumeration value=PEN gt
ltsenumeration value=PHP gt
ltsenumeration value=XPT gt
ltsenumeration value=PLN gt
ltsenumeration value=QAR gt
ltsenumeration value=ROL gt
ltsenumeration value=RUB gt
ltsenumeration value=WST gt
ltsenumeration value=STD gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 8
ltsenumeration value=SAR gt
ltsenumeration value=SCR gt
ltsenumeration value=SLL gt
ltsenumeration value=XAG gt
ltsenumeration value=SGD gt
ltsenumeration value=SKK gt
ltsenumeration value=SIT gt
ltsenumeration value=SBD gt
ltsenumeration value=SOS gt
ltsenumeration value=ZAR gt
ltsenumeration value=LKR gt
ltsenumeration value=SHP gt
ltsenumeration value=SDD gt
ltsenumeration value=SRG gt
ltsenumeration value=SZL gt
ltsenumeration value=SEK gt
ltsenumeration value=CHF gt
ltsenumeration value=SYP gt
ltsenumeration value=TWD gt
ltsenumeration value=TZS gt
ltsenumeration value=THB gt
ltsenumeration value=TOP gt
ltsenumeration value=TTD gt
ltsenumeration value=TND gt
ltsenumeration value=TRL gt
ltsenumeration value=USD gt
ltsenumeration value=AED gt
ltsenumeration value=UGX gt
ltsenumeration value=UAH gt
ltsenumeration value=UYU gt
ltsenumeration value=VUV gt
ltsenumeration value=VEB gt
ltsenumeration value=VND gt
ltsenumeration value=YER gt
ltsenumeration value=YUM gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 9
ltsenumeration value=ZMK gt
ltsenumeration value=ZWD gt
ltsenumeration value=TRY gt
ltsrestrictiongt
ltssimpleTypegt
- ltselement name=ConversionRateResponsegt
- ltscomplexTypegt
- ltssequencegt
ltselement minOccurs=1 maxOccurs=1 name=ConversionRateResult type=sdouble
gt
ltssequencegt
ltscomplexTypegt
ltselementgt
ltselement name=double type=sdouble gt
ltsschemagt
ltwsdltypesgt
- ltwsdlmessage name=ConversionRateSoapIngt
ltwsdlpart name=parameters element=tnsConversionRate gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateSoapOutgt
ltwsdlpart name=parameters element=tnsConversionRateResponse gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpGetIngt
ltwsdlpart name=FromCurrency type=sstring gt
ltwsdlpart name=ToCurrency type=sstring gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpGetOutgt
ltwsdlpart name=Body element=tnsdouble gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpPostIngt
ltwsdlpart name=FromCurrency type=sstring gt
ltwsdlpart name=ToCurrency type=sstring gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpPostOutgt
ltwsdlpart name=Body element=tnsdouble gt
ltwsdlmessagegt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 10
- ltwsdlportType name=CurrencyConvertorSoapgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 11
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateSoapIn gt
ltwsdloutput message=tnsConversionRateSoapOut gt
ltwsdloperationgt
ltwsdlportTypegt
------------Start Removing The Operarion from here-------------
- ltwsdlportType name=CurrencyConvertorHttpGetgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 12
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpGetIn gt
ltwsdloutput message=tnsConversionRateHttpGetOut gt
ltwsdloperationgt
ltwsdlportTypegt
- ltwsdlportType name=CurrencyConvertorHttpPostgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 13
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpPostIn gt
ltwsdloutput message=tnsConversionRateHttpPostOut gt
ltwsdloperationgt
ltwsdlportTypegt
--------------------Remove Operation Up to here------------------
- ltwsdlbinding name=CurrencyConvertorSoap type=tnsCurrencyConvertorSoapgt
ltsoapbinding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoapoperation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoapbody use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoapbody use=literal gt
ltwsdloutputgt
ltwsdloperationgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 14
ltwsdlbindinggt
---------------Start Removing The Binding from Here-------------
- ltwsdlbinding name=CurrencyConvertorSoap12 type=tnsCurrencyConvertorSoapgt
ltsoap12binding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoap12operation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoap12body use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoap12body use=literal gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpGet type=tnsCurrencyConvertorHttpGetgt
lthttpbinding verb=GET gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
lthttpurlEncoded gt
ltwsdlinputgt
- ltwsdloutputgt
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpPost
type=tnsCurrencyConvertorHttpPostgt
lthttpbinding verb=POST gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
ltmimecontent type=applicationx-www-form-urlencoded gt
ltwsdlinputgt
- ltwsdloutputgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 15
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
---------------------Remove Binding Upto Here--------------------
- ltwsdlservice name=CurrencyConvertorgt
- ltwsdlport name=CurrencyConvertorSoap binding=tnsCurrencyConvertorSoapgt
ltsoapaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------Start Removing The PORT from Here------------------
- ltwsdlport name=CurrencyConvertorSoap12 binding=tnsCurrencyConvertorSoap12gt
ltsoap12address location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpGet binding=tnsCurrencyConvertorHttpGetgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpPost
binding=tnsCurrencyConvertorHttpPostgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------------------Remove Port Upto Here----------------------
ltwsdlservicegt
ltwsdldefinitionsgt
So now the initial preparation is over and name the WSDL file as testCurrencyconverterwsdl
Login into the SAP system and we have to perform basically two jobs to use the service offered by the Currency Convertor webservice
The creation of consumer proxy
Logical endpoint creation in SOAMANAGER for the consumer proxy
Open SE80 transaction and follow the steps shown in the screenshot below to create consumer proxy
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 16
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 17
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 18
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 19
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 20
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 21
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 22
Now we go to SOAMANAGER and create a logical end point for the consumer proxy Follow the screenshots for the same
SOAMANGER opens the transaction in a browser perform the below mentioned steps
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 4
Now lets see the XML specification of the Currency Convertor Webservice and we can easily make out that multiple bindings are present with the multiple ports Lets keep the operation
ltwsdloperation name=ConversionRategt and the respective binding
ltwsdlbinding name=CurrencyConvertorSoap type=tnsCurrencyConvertorSoapgt and the respective port
ltwsdlport name=CurrencyConvertorSoap binding=tnsCurrencyConvertorSoapgt
I mean copy the WSDL file and edit it in a notepad keep the parts which are mentioned above and remove the following Finally save it with the extention ldquowsdlrdquo
ltxml version=10 encoding=utf-8 gt
- ltwsdldefinitions xmlnssoap=httpschemasxmlsoaporgwsdlsoap
xmlnstm=httpmicrosoftcomwsdlmimetextMatching
xmlnssoapenc=httpschemasxmlsoaporgsoapencoding
xmlnsmime=httpschemasxmlsoaporgwsdlmime
xmlnstns=httpwwwwebserviceXNET
xmlnss=httpwwww3org2001XMLSchema
xmlnssoap12=httpschemasxmlsoaporgwsdlsoap12
xmlnshttp=httpschemasxmlsoaporgwsdlhttp
targetNamespace=httpwwwwebserviceXNET
xmlnswsdl=httpschemasxmlsoaporgwsdlgt
- ltwsdltypesgt
- ltsschema elementFormDefault=qualified
targetNamespace=httpwwwwebserviceXNETgt
- ltselement name=ConversionRategt
- ltscomplexTypegt
- ltssequencegt
ltselement minOccurs=1 maxOccurs=1 name=FromCurrency type=tnsCurrency gt
ltselement minOccurs=1 maxOccurs=1 name=ToCurrency type=tnsCurrency gt
ltssequencegt
ltscomplexTypegt
ltselementgt
- ltssimpleType name=Currencygt
- ltsrestriction base=sstringgt
ltsenumeration value=AFA gt
ltsenumeration value=ALL gt
ltsenumeration value=DZD gt
ltsenumeration value=ARS gt
ltsenumeration value=AWG gt
ltsenumeration value=AUD gt
ltsenumeration value=BSD gt
ltsenumeration value=BHD gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 5
ltsenumeration value=BDT gt
ltsenumeration value=BBD gt
ltsenumeration value=BZD gt
ltsenumeration value=BMD gt
ltsenumeration value=BTN gt
ltsenumeration value=BOB gt
ltsenumeration value=BWP gt
ltsenumeration value=BRL gt
ltsenumeration value=GBP gt
ltsenumeration value=BND gt
ltsenumeration value=BIF gt
ltsenumeration value=XOF gt
ltsenumeration value=XAF gt
ltsenumeration value=KHR gt
ltsenumeration value=CAD gt
ltsenumeration value=CVE gt
ltsenumeration value=KYD gt
ltsenumeration value=CLP gt
ltsenumeration value=CNY gt
ltsenumeration value=COP gt
ltsenumeration value=KMF gt
ltsenumeration value=CRC gt
ltsenumeration value=HRK gt
ltsenumeration value=CUP gt
ltsenumeration value=CYP gt
ltsenumeration value=CZK gt
ltsenumeration value=DKK gt
ltsenumeration value=DJF gt
ltsenumeration value=DOP gt
ltsenumeration value=XCD gt
ltsenumeration value=EGP gt
ltsenumeration value=SVC gt
ltsenumeration value=EEK gt
ltsenumeration value=ETB gt
ltsenumeration value=EUR gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 6
ltsenumeration value=FKP gt
ltsenumeration value=GMD gt
ltsenumeration value=GHC gt
ltsenumeration value=GIP gt
ltsenumeration value=XAU gt
ltsenumeration value=GTQ gt
ltsenumeration value=GNF gt
ltsenumeration value=GYD gt
ltsenumeration value=HTG gt
ltsenumeration value=HNL gt
ltsenumeration value=HKD gt
ltsenumeration value=HUF gt
ltsenumeration value=ISK gt
ltsenumeration value=INR gt
ltsenumeration value=IDR gt
ltsenumeration value=IQD gt
ltsenumeration value=ILS gt
ltsenumeration value=JMD gt
ltsenumeration value=JPY gt
ltsenumeration value=JOD gt
ltsenumeration value=KZT gt
ltsenumeration value=KES gt
ltsenumeration value=KRW gt
ltsenumeration value=KWD gt
ltsenumeration value=LAK gt
ltsenumeration value=LVL gt
ltsenumeration value=LBP gt
ltsenumeration value=LSL gt
ltsenumeration value=LRD gt
ltsenumeration value=LYD gt
ltsenumeration value=LTL gt
ltsenumeration value=MOP gt
ltsenumeration value=MKD gt
ltsenumeration value=MGF gt
ltsenumeration value=MWK gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 7
ltsenumeration value=MYR gt
ltsenumeration value=MVR gt
ltsenumeration value=MTL gt
ltsenumeration value=MRO gt
ltsenumeration value=MUR gt
ltsenumeration value=MXN gt
ltsenumeration value=MDL gt
ltsenumeration value=MNT gt
ltsenumeration value=MAD gt
ltsenumeration value=MZM gt
ltsenumeration value=MMK gt
ltsenumeration value=NAD gt
ltsenumeration value=NPR gt
ltsenumeration value=ANG gt
ltsenumeration value=NZD gt
ltsenumeration value=NIO gt
ltsenumeration value=NGN gt
ltsenumeration value=KPW gt
ltsenumeration value=NOK gt
ltsenumeration value=OMR gt
ltsenumeration value=XPF gt
ltsenumeration value=PKR gt
ltsenumeration value=XPD gt
ltsenumeration value=PAB gt
ltsenumeration value=PGK gt
ltsenumeration value=PYG gt
ltsenumeration value=PEN gt
ltsenumeration value=PHP gt
ltsenumeration value=XPT gt
ltsenumeration value=PLN gt
ltsenumeration value=QAR gt
ltsenumeration value=ROL gt
ltsenumeration value=RUB gt
ltsenumeration value=WST gt
ltsenumeration value=STD gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 8
ltsenumeration value=SAR gt
ltsenumeration value=SCR gt
ltsenumeration value=SLL gt
ltsenumeration value=XAG gt
ltsenumeration value=SGD gt
ltsenumeration value=SKK gt
ltsenumeration value=SIT gt
ltsenumeration value=SBD gt
ltsenumeration value=SOS gt
ltsenumeration value=ZAR gt
ltsenumeration value=LKR gt
ltsenumeration value=SHP gt
ltsenumeration value=SDD gt
ltsenumeration value=SRG gt
ltsenumeration value=SZL gt
ltsenumeration value=SEK gt
ltsenumeration value=CHF gt
ltsenumeration value=SYP gt
ltsenumeration value=TWD gt
ltsenumeration value=TZS gt
ltsenumeration value=THB gt
ltsenumeration value=TOP gt
ltsenumeration value=TTD gt
ltsenumeration value=TND gt
ltsenumeration value=TRL gt
ltsenumeration value=USD gt
ltsenumeration value=AED gt
ltsenumeration value=UGX gt
ltsenumeration value=UAH gt
ltsenumeration value=UYU gt
ltsenumeration value=VUV gt
ltsenumeration value=VEB gt
ltsenumeration value=VND gt
ltsenumeration value=YER gt
ltsenumeration value=YUM gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 9
ltsenumeration value=ZMK gt
ltsenumeration value=ZWD gt
ltsenumeration value=TRY gt
ltsrestrictiongt
ltssimpleTypegt
- ltselement name=ConversionRateResponsegt
- ltscomplexTypegt
- ltssequencegt
ltselement minOccurs=1 maxOccurs=1 name=ConversionRateResult type=sdouble
gt
ltssequencegt
ltscomplexTypegt
ltselementgt
ltselement name=double type=sdouble gt
ltsschemagt
ltwsdltypesgt
- ltwsdlmessage name=ConversionRateSoapIngt
ltwsdlpart name=parameters element=tnsConversionRate gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateSoapOutgt
ltwsdlpart name=parameters element=tnsConversionRateResponse gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpGetIngt
ltwsdlpart name=FromCurrency type=sstring gt
ltwsdlpart name=ToCurrency type=sstring gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpGetOutgt
ltwsdlpart name=Body element=tnsdouble gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpPostIngt
ltwsdlpart name=FromCurrency type=sstring gt
ltwsdlpart name=ToCurrency type=sstring gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpPostOutgt
ltwsdlpart name=Body element=tnsdouble gt
ltwsdlmessagegt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 10
- ltwsdlportType name=CurrencyConvertorSoapgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 11
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateSoapIn gt
ltwsdloutput message=tnsConversionRateSoapOut gt
ltwsdloperationgt
ltwsdlportTypegt
------------Start Removing The Operarion from here-------------
- ltwsdlportType name=CurrencyConvertorHttpGetgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 12
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpGetIn gt
ltwsdloutput message=tnsConversionRateHttpGetOut gt
ltwsdloperationgt
ltwsdlportTypegt
- ltwsdlportType name=CurrencyConvertorHttpPostgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 13
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpPostIn gt
ltwsdloutput message=tnsConversionRateHttpPostOut gt
ltwsdloperationgt
ltwsdlportTypegt
--------------------Remove Operation Up to here------------------
- ltwsdlbinding name=CurrencyConvertorSoap type=tnsCurrencyConvertorSoapgt
ltsoapbinding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoapoperation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoapbody use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoapbody use=literal gt
ltwsdloutputgt
ltwsdloperationgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 14
ltwsdlbindinggt
---------------Start Removing The Binding from Here-------------
- ltwsdlbinding name=CurrencyConvertorSoap12 type=tnsCurrencyConvertorSoapgt
ltsoap12binding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoap12operation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoap12body use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoap12body use=literal gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpGet type=tnsCurrencyConvertorHttpGetgt
lthttpbinding verb=GET gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
lthttpurlEncoded gt
ltwsdlinputgt
- ltwsdloutputgt
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpPost
type=tnsCurrencyConvertorHttpPostgt
lthttpbinding verb=POST gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
ltmimecontent type=applicationx-www-form-urlencoded gt
ltwsdlinputgt
- ltwsdloutputgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 15
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
---------------------Remove Binding Upto Here--------------------
- ltwsdlservice name=CurrencyConvertorgt
- ltwsdlport name=CurrencyConvertorSoap binding=tnsCurrencyConvertorSoapgt
ltsoapaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------Start Removing The PORT from Here------------------
- ltwsdlport name=CurrencyConvertorSoap12 binding=tnsCurrencyConvertorSoap12gt
ltsoap12address location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpGet binding=tnsCurrencyConvertorHttpGetgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpPost
binding=tnsCurrencyConvertorHttpPostgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------------------Remove Port Upto Here----------------------
ltwsdlservicegt
ltwsdldefinitionsgt
So now the initial preparation is over and name the WSDL file as testCurrencyconverterwsdl
Login into the SAP system and we have to perform basically two jobs to use the service offered by the Currency Convertor webservice
The creation of consumer proxy
Logical endpoint creation in SOAMANAGER for the consumer proxy
Open SE80 transaction and follow the steps shown in the screenshot below to create consumer proxy
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 16
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 17
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 18
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 19
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 20
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 21
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 22
Now we go to SOAMANAGER and create a logical end point for the consumer proxy Follow the screenshots for the same
SOAMANGER opens the transaction in a browser perform the below mentioned steps
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 5
ltsenumeration value=BDT gt
ltsenumeration value=BBD gt
ltsenumeration value=BZD gt
ltsenumeration value=BMD gt
ltsenumeration value=BTN gt
ltsenumeration value=BOB gt
ltsenumeration value=BWP gt
ltsenumeration value=BRL gt
ltsenumeration value=GBP gt
ltsenumeration value=BND gt
ltsenumeration value=BIF gt
ltsenumeration value=XOF gt
ltsenumeration value=XAF gt
ltsenumeration value=KHR gt
ltsenumeration value=CAD gt
ltsenumeration value=CVE gt
ltsenumeration value=KYD gt
ltsenumeration value=CLP gt
ltsenumeration value=CNY gt
ltsenumeration value=COP gt
ltsenumeration value=KMF gt
ltsenumeration value=CRC gt
ltsenumeration value=HRK gt
ltsenumeration value=CUP gt
ltsenumeration value=CYP gt
ltsenumeration value=CZK gt
ltsenumeration value=DKK gt
ltsenumeration value=DJF gt
ltsenumeration value=DOP gt
ltsenumeration value=XCD gt
ltsenumeration value=EGP gt
ltsenumeration value=SVC gt
ltsenumeration value=EEK gt
ltsenumeration value=ETB gt
ltsenumeration value=EUR gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 6
ltsenumeration value=FKP gt
ltsenumeration value=GMD gt
ltsenumeration value=GHC gt
ltsenumeration value=GIP gt
ltsenumeration value=XAU gt
ltsenumeration value=GTQ gt
ltsenumeration value=GNF gt
ltsenumeration value=GYD gt
ltsenumeration value=HTG gt
ltsenumeration value=HNL gt
ltsenumeration value=HKD gt
ltsenumeration value=HUF gt
ltsenumeration value=ISK gt
ltsenumeration value=INR gt
ltsenumeration value=IDR gt
ltsenumeration value=IQD gt
ltsenumeration value=ILS gt
ltsenumeration value=JMD gt
ltsenumeration value=JPY gt
ltsenumeration value=JOD gt
ltsenumeration value=KZT gt
ltsenumeration value=KES gt
ltsenumeration value=KRW gt
ltsenumeration value=KWD gt
ltsenumeration value=LAK gt
ltsenumeration value=LVL gt
ltsenumeration value=LBP gt
ltsenumeration value=LSL gt
ltsenumeration value=LRD gt
ltsenumeration value=LYD gt
ltsenumeration value=LTL gt
ltsenumeration value=MOP gt
ltsenumeration value=MKD gt
ltsenumeration value=MGF gt
ltsenumeration value=MWK gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 7
ltsenumeration value=MYR gt
ltsenumeration value=MVR gt
ltsenumeration value=MTL gt
ltsenumeration value=MRO gt
ltsenumeration value=MUR gt
ltsenumeration value=MXN gt
ltsenumeration value=MDL gt
ltsenumeration value=MNT gt
ltsenumeration value=MAD gt
ltsenumeration value=MZM gt
ltsenumeration value=MMK gt
ltsenumeration value=NAD gt
ltsenumeration value=NPR gt
ltsenumeration value=ANG gt
ltsenumeration value=NZD gt
ltsenumeration value=NIO gt
ltsenumeration value=NGN gt
ltsenumeration value=KPW gt
ltsenumeration value=NOK gt
ltsenumeration value=OMR gt
ltsenumeration value=XPF gt
ltsenumeration value=PKR gt
ltsenumeration value=XPD gt
ltsenumeration value=PAB gt
ltsenumeration value=PGK gt
ltsenumeration value=PYG gt
ltsenumeration value=PEN gt
ltsenumeration value=PHP gt
ltsenumeration value=XPT gt
ltsenumeration value=PLN gt
ltsenumeration value=QAR gt
ltsenumeration value=ROL gt
ltsenumeration value=RUB gt
ltsenumeration value=WST gt
ltsenumeration value=STD gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 8
ltsenumeration value=SAR gt
ltsenumeration value=SCR gt
ltsenumeration value=SLL gt
ltsenumeration value=XAG gt
ltsenumeration value=SGD gt
ltsenumeration value=SKK gt
ltsenumeration value=SIT gt
ltsenumeration value=SBD gt
ltsenumeration value=SOS gt
ltsenumeration value=ZAR gt
ltsenumeration value=LKR gt
ltsenumeration value=SHP gt
ltsenumeration value=SDD gt
ltsenumeration value=SRG gt
ltsenumeration value=SZL gt
ltsenumeration value=SEK gt
ltsenumeration value=CHF gt
ltsenumeration value=SYP gt
ltsenumeration value=TWD gt
ltsenumeration value=TZS gt
ltsenumeration value=THB gt
ltsenumeration value=TOP gt
ltsenumeration value=TTD gt
ltsenumeration value=TND gt
ltsenumeration value=TRL gt
ltsenumeration value=USD gt
ltsenumeration value=AED gt
ltsenumeration value=UGX gt
ltsenumeration value=UAH gt
ltsenumeration value=UYU gt
ltsenumeration value=VUV gt
ltsenumeration value=VEB gt
ltsenumeration value=VND gt
ltsenumeration value=YER gt
ltsenumeration value=YUM gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 9
ltsenumeration value=ZMK gt
ltsenumeration value=ZWD gt
ltsenumeration value=TRY gt
ltsrestrictiongt
ltssimpleTypegt
- ltselement name=ConversionRateResponsegt
- ltscomplexTypegt
- ltssequencegt
ltselement minOccurs=1 maxOccurs=1 name=ConversionRateResult type=sdouble
gt
ltssequencegt
ltscomplexTypegt
ltselementgt
ltselement name=double type=sdouble gt
ltsschemagt
ltwsdltypesgt
- ltwsdlmessage name=ConversionRateSoapIngt
ltwsdlpart name=parameters element=tnsConversionRate gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateSoapOutgt
ltwsdlpart name=parameters element=tnsConversionRateResponse gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpGetIngt
ltwsdlpart name=FromCurrency type=sstring gt
ltwsdlpart name=ToCurrency type=sstring gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpGetOutgt
ltwsdlpart name=Body element=tnsdouble gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpPostIngt
ltwsdlpart name=FromCurrency type=sstring gt
ltwsdlpart name=ToCurrency type=sstring gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpPostOutgt
ltwsdlpart name=Body element=tnsdouble gt
ltwsdlmessagegt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 10
- ltwsdlportType name=CurrencyConvertorSoapgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 11
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateSoapIn gt
ltwsdloutput message=tnsConversionRateSoapOut gt
ltwsdloperationgt
ltwsdlportTypegt
------------Start Removing The Operarion from here-------------
- ltwsdlportType name=CurrencyConvertorHttpGetgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 12
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpGetIn gt
ltwsdloutput message=tnsConversionRateHttpGetOut gt
ltwsdloperationgt
ltwsdlportTypegt
- ltwsdlportType name=CurrencyConvertorHttpPostgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 13
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpPostIn gt
ltwsdloutput message=tnsConversionRateHttpPostOut gt
ltwsdloperationgt
ltwsdlportTypegt
--------------------Remove Operation Up to here------------------
- ltwsdlbinding name=CurrencyConvertorSoap type=tnsCurrencyConvertorSoapgt
ltsoapbinding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoapoperation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoapbody use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoapbody use=literal gt
ltwsdloutputgt
ltwsdloperationgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 14
ltwsdlbindinggt
---------------Start Removing The Binding from Here-------------
- ltwsdlbinding name=CurrencyConvertorSoap12 type=tnsCurrencyConvertorSoapgt
ltsoap12binding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoap12operation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoap12body use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoap12body use=literal gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpGet type=tnsCurrencyConvertorHttpGetgt
lthttpbinding verb=GET gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
lthttpurlEncoded gt
ltwsdlinputgt
- ltwsdloutputgt
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpPost
type=tnsCurrencyConvertorHttpPostgt
lthttpbinding verb=POST gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
ltmimecontent type=applicationx-www-form-urlencoded gt
ltwsdlinputgt
- ltwsdloutputgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 15
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
---------------------Remove Binding Upto Here--------------------
- ltwsdlservice name=CurrencyConvertorgt
- ltwsdlport name=CurrencyConvertorSoap binding=tnsCurrencyConvertorSoapgt
ltsoapaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------Start Removing The PORT from Here------------------
- ltwsdlport name=CurrencyConvertorSoap12 binding=tnsCurrencyConvertorSoap12gt
ltsoap12address location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpGet binding=tnsCurrencyConvertorHttpGetgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpPost
binding=tnsCurrencyConvertorHttpPostgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------------------Remove Port Upto Here----------------------
ltwsdlservicegt
ltwsdldefinitionsgt
So now the initial preparation is over and name the WSDL file as testCurrencyconverterwsdl
Login into the SAP system and we have to perform basically two jobs to use the service offered by the Currency Convertor webservice
The creation of consumer proxy
Logical endpoint creation in SOAMANAGER for the consumer proxy
Open SE80 transaction and follow the steps shown in the screenshot below to create consumer proxy
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 16
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 17
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 18
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 19
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 20
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 21
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 22
Now we go to SOAMANAGER and create a logical end point for the consumer proxy Follow the screenshots for the same
SOAMANGER opens the transaction in a browser perform the below mentioned steps
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 6
ltsenumeration value=FKP gt
ltsenumeration value=GMD gt
ltsenumeration value=GHC gt
ltsenumeration value=GIP gt
ltsenumeration value=XAU gt
ltsenumeration value=GTQ gt
ltsenumeration value=GNF gt
ltsenumeration value=GYD gt
ltsenumeration value=HTG gt
ltsenumeration value=HNL gt
ltsenumeration value=HKD gt
ltsenumeration value=HUF gt
ltsenumeration value=ISK gt
ltsenumeration value=INR gt
ltsenumeration value=IDR gt
ltsenumeration value=IQD gt
ltsenumeration value=ILS gt
ltsenumeration value=JMD gt
ltsenumeration value=JPY gt
ltsenumeration value=JOD gt
ltsenumeration value=KZT gt
ltsenumeration value=KES gt
ltsenumeration value=KRW gt
ltsenumeration value=KWD gt
ltsenumeration value=LAK gt
ltsenumeration value=LVL gt
ltsenumeration value=LBP gt
ltsenumeration value=LSL gt
ltsenumeration value=LRD gt
ltsenumeration value=LYD gt
ltsenumeration value=LTL gt
ltsenumeration value=MOP gt
ltsenumeration value=MKD gt
ltsenumeration value=MGF gt
ltsenumeration value=MWK gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 7
ltsenumeration value=MYR gt
ltsenumeration value=MVR gt
ltsenumeration value=MTL gt
ltsenumeration value=MRO gt
ltsenumeration value=MUR gt
ltsenumeration value=MXN gt
ltsenumeration value=MDL gt
ltsenumeration value=MNT gt
ltsenumeration value=MAD gt
ltsenumeration value=MZM gt
ltsenumeration value=MMK gt
ltsenumeration value=NAD gt
ltsenumeration value=NPR gt
ltsenumeration value=ANG gt
ltsenumeration value=NZD gt
ltsenumeration value=NIO gt
ltsenumeration value=NGN gt
ltsenumeration value=KPW gt
ltsenumeration value=NOK gt
ltsenumeration value=OMR gt
ltsenumeration value=XPF gt
ltsenumeration value=PKR gt
ltsenumeration value=XPD gt
ltsenumeration value=PAB gt
ltsenumeration value=PGK gt
ltsenumeration value=PYG gt
ltsenumeration value=PEN gt
ltsenumeration value=PHP gt
ltsenumeration value=XPT gt
ltsenumeration value=PLN gt
ltsenumeration value=QAR gt
ltsenumeration value=ROL gt
ltsenumeration value=RUB gt
ltsenumeration value=WST gt
ltsenumeration value=STD gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 8
ltsenumeration value=SAR gt
ltsenumeration value=SCR gt
ltsenumeration value=SLL gt
ltsenumeration value=XAG gt
ltsenumeration value=SGD gt
ltsenumeration value=SKK gt
ltsenumeration value=SIT gt
ltsenumeration value=SBD gt
ltsenumeration value=SOS gt
ltsenumeration value=ZAR gt
ltsenumeration value=LKR gt
ltsenumeration value=SHP gt
ltsenumeration value=SDD gt
ltsenumeration value=SRG gt
ltsenumeration value=SZL gt
ltsenumeration value=SEK gt
ltsenumeration value=CHF gt
ltsenumeration value=SYP gt
ltsenumeration value=TWD gt
ltsenumeration value=TZS gt
ltsenumeration value=THB gt
ltsenumeration value=TOP gt
ltsenumeration value=TTD gt
ltsenumeration value=TND gt
ltsenumeration value=TRL gt
ltsenumeration value=USD gt
ltsenumeration value=AED gt
ltsenumeration value=UGX gt
ltsenumeration value=UAH gt
ltsenumeration value=UYU gt
ltsenumeration value=VUV gt
ltsenumeration value=VEB gt
ltsenumeration value=VND gt
ltsenumeration value=YER gt
ltsenumeration value=YUM gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 9
ltsenumeration value=ZMK gt
ltsenumeration value=ZWD gt
ltsenumeration value=TRY gt
ltsrestrictiongt
ltssimpleTypegt
- ltselement name=ConversionRateResponsegt
- ltscomplexTypegt
- ltssequencegt
ltselement minOccurs=1 maxOccurs=1 name=ConversionRateResult type=sdouble
gt
ltssequencegt
ltscomplexTypegt
ltselementgt
ltselement name=double type=sdouble gt
ltsschemagt
ltwsdltypesgt
- ltwsdlmessage name=ConversionRateSoapIngt
ltwsdlpart name=parameters element=tnsConversionRate gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateSoapOutgt
ltwsdlpart name=parameters element=tnsConversionRateResponse gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpGetIngt
ltwsdlpart name=FromCurrency type=sstring gt
ltwsdlpart name=ToCurrency type=sstring gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpGetOutgt
ltwsdlpart name=Body element=tnsdouble gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpPostIngt
ltwsdlpart name=FromCurrency type=sstring gt
ltwsdlpart name=ToCurrency type=sstring gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpPostOutgt
ltwsdlpart name=Body element=tnsdouble gt
ltwsdlmessagegt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 10
- ltwsdlportType name=CurrencyConvertorSoapgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 11
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateSoapIn gt
ltwsdloutput message=tnsConversionRateSoapOut gt
ltwsdloperationgt
ltwsdlportTypegt
------------Start Removing The Operarion from here-------------
- ltwsdlportType name=CurrencyConvertorHttpGetgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 12
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpGetIn gt
ltwsdloutput message=tnsConversionRateHttpGetOut gt
ltwsdloperationgt
ltwsdlportTypegt
- ltwsdlportType name=CurrencyConvertorHttpPostgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 13
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpPostIn gt
ltwsdloutput message=tnsConversionRateHttpPostOut gt
ltwsdloperationgt
ltwsdlportTypegt
--------------------Remove Operation Up to here------------------
- ltwsdlbinding name=CurrencyConvertorSoap type=tnsCurrencyConvertorSoapgt
ltsoapbinding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoapoperation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoapbody use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoapbody use=literal gt
ltwsdloutputgt
ltwsdloperationgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 14
ltwsdlbindinggt
---------------Start Removing The Binding from Here-------------
- ltwsdlbinding name=CurrencyConvertorSoap12 type=tnsCurrencyConvertorSoapgt
ltsoap12binding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoap12operation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoap12body use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoap12body use=literal gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpGet type=tnsCurrencyConvertorHttpGetgt
lthttpbinding verb=GET gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
lthttpurlEncoded gt
ltwsdlinputgt
- ltwsdloutputgt
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpPost
type=tnsCurrencyConvertorHttpPostgt
lthttpbinding verb=POST gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
ltmimecontent type=applicationx-www-form-urlencoded gt
ltwsdlinputgt
- ltwsdloutputgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 15
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
---------------------Remove Binding Upto Here--------------------
- ltwsdlservice name=CurrencyConvertorgt
- ltwsdlport name=CurrencyConvertorSoap binding=tnsCurrencyConvertorSoapgt
ltsoapaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------Start Removing The PORT from Here------------------
- ltwsdlport name=CurrencyConvertorSoap12 binding=tnsCurrencyConvertorSoap12gt
ltsoap12address location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpGet binding=tnsCurrencyConvertorHttpGetgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpPost
binding=tnsCurrencyConvertorHttpPostgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------------------Remove Port Upto Here----------------------
ltwsdlservicegt
ltwsdldefinitionsgt
So now the initial preparation is over and name the WSDL file as testCurrencyconverterwsdl
Login into the SAP system and we have to perform basically two jobs to use the service offered by the Currency Convertor webservice
The creation of consumer proxy
Logical endpoint creation in SOAMANAGER for the consumer proxy
Open SE80 transaction and follow the steps shown in the screenshot below to create consumer proxy
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 16
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 17
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 18
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 19
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 20
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 21
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 22
Now we go to SOAMANAGER and create a logical end point for the consumer proxy Follow the screenshots for the same
SOAMANGER opens the transaction in a browser perform the below mentioned steps
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 7
ltsenumeration value=MYR gt
ltsenumeration value=MVR gt
ltsenumeration value=MTL gt
ltsenumeration value=MRO gt
ltsenumeration value=MUR gt
ltsenumeration value=MXN gt
ltsenumeration value=MDL gt
ltsenumeration value=MNT gt
ltsenumeration value=MAD gt
ltsenumeration value=MZM gt
ltsenumeration value=MMK gt
ltsenumeration value=NAD gt
ltsenumeration value=NPR gt
ltsenumeration value=ANG gt
ltsenumeration value=NZD gt
ltsenumeration value=NIO gt
ltsenumeration value=NGN gt
ltsenumeration value=KPW gt
ltsenumeration value=NOK gt
ltsenumeration value=OMR gt
ltsenumeration value=XPF gt
ltsenumeration value=PKR gt
ltsenumeration value=XPD gt
ltsenumeration value=PAB gt
ltsenumeration value=PGK gt
ltsenumeration value=PYG gt
ltsenumeration value=PEN gt
ltsenumeration value=PHP gt
ltsenumeration value=XPT gt
ltsenumeration value=PLN gt
ltsenumeration value=QAR gt
ltsenumeration value=ROL gt
ltsenumeration value=RUB gt
ltsenumeration value=WST gt
ltsenumeration value=STD gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 8
ltsenumeration value=SAR gt
ltsenumeration value=SCR gt
ltsenumeration value=SLL gt
ltsenumeration value=XAG gt
ltsenumeration value=SGD gt
ltsenumeration value=SKK gt
ltsenumeration value=SIT gt
ltsenumeration value=SBD gt
ltsenumeration value=SOS gt
ltsenumeration value=ZAR gt
ltsenumeration value=LKR gt
ltsenumeration value=SHP gt
ltsenumeration value=SDD gt
ltsenumeration value=SRG gt
ltsenumeration value=SZL gt
ltsenumeration value=SEK gt
ltsenumeration value=CHF gt
ltsenumeration value=SYP gt
ltsenumeration value=TWD gt
ltsenumeration value=TZS gt
ltsenumeration value=THB gt
ltsenumeration value=TOP gt
ltsenumeration value=TTD gt
ltsenumeration value=TND gt
ltsenumeration value=TRL gt
ltsenumeration value=USD gt
ltsenumeration value=AED gt
ltsenumeration value=UGX gt
ltsenumeration value=UAH gt
ltsenumeration value=UYU gt
ltsenumeration value=VUV gt
ltsenumeration value=VEB gt
ltsenumeration value=VND gt
ltsenumeration value=YER gt
ltsenumeration value=YUM gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 9
ltsenumeration value=ZMK gt
ltsenumeration value=ZWD gt
ltsenumeration value=TRY gt
ltsrestrictiongt
ltssimpleTypegt
- ltselement name=ConversionRateResponsegt
- ltscomplexTypegt
- ltssequencegt
ltselement minOccurs=1 maxOccurs=1 name=ConversionRateResult type=sdouble
gt
ltssequencegt
ltscomplexTypegt
ltselementgt
ltselement name=double type=sdouble gt
ltsschemagt
ltwsdltypesgt
- ltwsdlmessage name=ConversionRateSoapIngt
ltwsdlpart name=parameters element=tnsConversionRate gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateSoapOutgt
ltwsdlpart name=parameters element=tnsConversionRateResponse gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpGetIngt
ltwsdlpart name=FromCurrency type=sstring gt
ltwsdlpart name=ToCurrency type=sstring gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpGetOutgt
ltwsdlpart name=Body element=tnsdouble gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpPostIngt
ltwsdlpart name=FromCurrency type=sstring gt
ltwsdlpart name=ToCurrency type=sstring gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpPostOutgt
ltwsdlpart name=Body element=tnsdouble gt
ltwsdlmessagegt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 10
- ltwsdlportType name=CurrencyConvertorSoapgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 11
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateSoapIn gt
ltwsdloutput message=tnsConversionRateSoapOut gt
ltwsdloperationgt
ltwsdlportTypegt
------------Start Removing The Operarion from here-------------
- ltwsdlportType name=CurrencyConvertorHttpGetgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 12
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpGetIn gt
ltwsdloutput message=tnsConversionRateHttpGetOut gt
ltwsdloperationgt
ltwsdlportTypegt
- ltwsdlportType name=CurrencyConvertorHttpPostgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 13
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpPostIn gt
ltwsdloutput message=tnsConversionRateHttpPostOut gt
ltwsdloperationgt
ltwsdlportTypegt
--------------------Remove Operation Up to here------------------
- ltwsdlbinding name=CurrencyConvertorSoap type=tnsCurrencyConvertorSoapgt
ltsoapbinding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoapoperation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoapbody use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoapbody use=literal gt
ltwsdloutputgt
ltwsdloperationgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 14
ltwsdlbindinggt
---------------Start Removing The Binding from Here-------------
- ltwsdlbinding name=CurrencyConvertorSoap12 type=tnsCurrencyConvertorSoapgt
ltsoap12binding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoap12operation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoap12body use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoap12body use=literal gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpGet type=tnsCurrencyConvertorHttpGetgt
lthttpbinding verb=GET gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
lthttpurlEncoded gt
ltwsdlinputgt
- ltwsdloutputgt
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpPost
type=tnsCurrencyConvertorHttpPostgt
lthttpbinding verb=POST gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
ltmimecontent type=applicationx-www-form-urlencoded gt
ltwsdlinputgt
- ltwsdloutputgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 15
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
---------------------Remove Binding Upto Here--------------------
- ltwsdlservice name=CurrencyConvertorgt
- ltwsdlport name=CurrencyConvertorSoap binding=tnsCurrencyConvertorSoapgt
ltsoapaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------Start Removing The PORT from Here------------------
- ltwsdlport name=CurrencyConvertorSoap12 binding=tnsCurrencyConvertorSoap12gt
ltsoap12address location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpGet binding=tnsCurrencyConvertorHttpGetgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpPost
binding=tnsCurrencyConvertorHttpPostgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------------------Remove Port Upto Here----------------------
ltwsdlservicegt
ltwsdldefinitionsgt
So now the initial preparation is over and name the WSDL file as testCurrencyconverterwsdl
Login into the SAP system and we have to perform basically two jobs to use the service offered by the Currency Convertor webservice
The creation of consumer proxy
Logical endpoint creation in SOAMANAGER for the consumer proxy
Open SE80 transaction and follow the steps shown in the screenshot below to create consumer proxy
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 16
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 17
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 18
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 19
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 20
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 21
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 22
Now we go to SOAMANAGER and create a logical end point for the consumer proxy Follow the screenshots for the same
SOAMANGER opens the transaction in a browser perform the below mentioned steps
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 8
ltsenumeration value=SAR gt
ltsenumeration value=SCR gt
ltsenumeration value=SLL gt
ltsenumeration value=XAG gt
ltsenumeration value=SGD gt
ltsenumeration value=SKK gt
ltsenumeration value=SIT gt
ltsenumeration value=SBD gt
ltsenumeration value=SOS gt
ltsenumeration value=ZAR gt
ltsenumeration value=LKR gt
ltsenumeration value=SHP gt
ltsenumeration value=SDD gt
ltsenumeration value=SRG gt
ltsenumeration value=SZL gt
ltsenumeration value=SEK gt
ltsenumeration value=CHF gt
ltsenumeration value=SYP gt
ltsenumeration value=TWD gt
ltsenumeration value=TZS gt
ltsenumeration value=THB gt
ltsenumeration value=TOP gt
ltsenumeration value=TTD gt
ltsenumeration value=TND gt
ltsenumeration value=TRL gt
ltsenumeration value=USD gt
ltsenumeration value=AED gt
ltsenumeration value=UGX gt
ltsenumeration value=UAH gt
ltsenumeration value=UYU gt
ltsenumeration value=VUV gt
ltsenumeration value=VEB gt
ltsenumeration value=VND gt
ltsenumeration value=YER gt
ltsenumeration value=YUM gt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 9
ltsenumeration value=ZMK gt
ltsenumeration value=ZWD gt
ltsenumeration value=TRY gt
ltsrestrictiongt
ltssimpleTypegt
- ltselement name=ConversionRateResponsegt
- ltscomplexTypegt
- ltssequencegt
ltselement minOccurs=1 maxOccurs=1 name=ConversionRateResult type=sdouble
gt
ltssequencegt
ltscomplexTypegt
ltselementgt
ltselement name=double type=sdouble gt
ltsschemagt
ltwsdltypesgt
- ltwsdlmessage name=ConversionRateSoapIngt
ltwsdlpart name=parameters element=tnsConversionRate gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateSoapOutgt
ltwsdlpart name=parameters element=tnsConversionRateResponse gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpGetIngt
ltwsdlpart name=FromCurrency type=sstring gt
ltwsdlpart name=ToCurrency type=sstring gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpGetOutgt
ltwsdlpart name=Body element=tnsdouble gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpPostIngt
ltwsdlpart name=FromCurrency type=sstring gt
ltwsdlpart name=ToCurrency type=sstring gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpPostOutgt
ltwsdlpart name=Body element=tnsdouble gt
ltwsdlmessagegt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 10
- ltwsdlportType name=CurrencyConvertorSoapgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 11
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateSoapIn gt
ltwsdloutput message=tnsConversionRateSoapOut gt
ltwsdloperationgt
ltwsdlportTypegt
------------Start Removing The Operarion from here-------------
- ltwsdlportType name=CurrencyConvertorHttpGetgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 12
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpGetIn gt
ltwsdloutput message=tnsConversionRateHttpGetOut gt
ltwsdloperationgt
ltwsdlportTypegt
- ltwsdlportType name=CurrencyConvertorHttpPostgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 13
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpPostIn gt
ltwsdloutput message=tnsConversionRateHttpPostOut gt
ltwsdloperationgt
ltwsdlportTypegt
--------------------Remove Operation Up to here------------------
- ltwsdlbinding name=CurrencyConvertorSoap type=tnsCurrencyConvertorSoapgt
ltsoapbinding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoapoperation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoapbody use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoapbody use=literal gt
ltwsdloutputgt
ltwsdloperationgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 14
ltwsdlbindinggt
---------------Start Removing The Binding from Here-------------
- ltwsdlbinding name=CurrencyConvertorSoap12 type=tnsCurrencyConvertorSoapgt
ltsoap12binding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoap12operation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoap12body use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoap12body use=literal gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpGet type=tnsCurrencyConvertorHttpGetgt
lthttpbinding verb=GET gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
lthttpurlEncoded gt
ltwsdlinputgt
- ltwsdloutputgt
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpPost
type=tnsCurrencyConvertorHttpPostgt
lthttpbinding verb=POST gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
ltmimecontent type=applicationx-www-form-urlencoded gt
ltwsdlinputgt
- ltwsdloutputgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 15
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
---------------------Remove Binding Upto Here--------------------
- ltwsdlservice name=CurrencyConvertorgt
- ltwsdlport name=CurrencyConvertorSoap binding=tnsCurrencyConvertorSoapgt
ltsoapaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------Start Removing The PORT from Here------------------
- ltwsdlport name=CurrencyConvertorSoap12 binding=tnsCurrencyConvertorSoap12gt
ltsoap12address location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpGet binding=tnsCurrencyConvertorHttpGetgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpPost
binding=tnsCurrencyConvertorHttpPostgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------------------Remove Port Upto Here----------------------
ltwsdlservicegt
ltwsdldefinitionsgt
So now the initial preparation is over and name the WSDL file as testCurrencyconverterwsdl
Login into the SAP system and we have to perform basically two jobs to use the service offered by the Currency Convertor webservice
The creation of consumer proxy
Logical endpoint creation in SOAMANAGER for the consumer proxy
Open SE80 transaction and follow the steps shown in the screenshot below to create consumer proxy
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 16
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 17
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 18
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 19
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 20
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 21
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 22
Now we go to SOAMANAGER and create a logical end point for the consumer proxy Follow the screenshots for the same
SOAMANGER opens the transaction in a browser perform the below mentioned steps
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 9
ltsenumeration value=ZMK gt
ltsenumeration value=ZWD gt
ltsenumeration value=TRY gt
ltsrestrictiongt
ltssimpleTypegt
- ltselement name=ConversionRateResponsegt
- ltscomplexTypegt
- ltssequencegt
ltselement minOccurs=1 maxOccurs=1 name=ConversionRateResult type=sdouble
gt
ltssequencegt
ltscomplexTypegt
ltselementgt
ltselement name=double type=sdouble gt
ltsschemagt
ltwsdltypesgt
- ltwsdlmessage name=ConversionRateSoapIngt
ltwsdlpart name=parameters element=tnsConversionRate gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateSoapOutgt
ltwsdlpart name=parameters element=tnsConversionRateResponse gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpGetIngt
ltwsdlpart name=FromCurrency type=sstring gt
ltwsdlpart name=ToCurrency type=sstring gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpGetOutgt
ltwsdlpart name=Body element=tnsdouble gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpPostIngt
ltwsdlpart name=FromCurrency type=sstring gt
ltwsdlpart name=ToCurrency type=sstring gt
ltwsdlmessagegt
- ltwsdlmessage name=ConversionRateHttpPostOutgt
ltwsdlpart name=Body element=tnsdouble gt
ltwsdlmessagegt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 10
- ltwsdlportType name=CurrencyConvertorSoapgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 11
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateSoapIn gt
ltwsdloutput message=tnsConversionRateSoapOut gt
ltwsdloperationgt
ltwsdlportTypegt
------------Start Removing The Operarion from here-------------
- ltwsdlportType name=CurrencyConvertorHttpGetgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 12
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpGetIn gt
ltwsdloutput message=tnsConversionRateHttpGetOut gt
ltwsdloperationgt
ltwsdlportTypegt
- ltwsdlportType name=CurrencyConvertorHttpPostgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 13
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpPostIn gt
ltwsdloutput message=tnsConversionRateHttpPostOut gt
ltwsdloperationgt
ltwsdlportTypegt
--------------------Remove Operation Up to here------------------
- ltwsdlbinding name=CurrencyConvertorSoap type=tnsCurrencyConvertorSoapgt
ltsoapbinding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoapoperation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoapbody use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoapbody use=literal gt
ltwsdloutputgt
ltwsdloperationgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 14
ltwsdlbindinggt
---------------Start Removing The Binding from Here-------------
- ltwsdlbinding name=CurrencyConvertorSoap12 type=tnsCurrencyConvertorSoapgt
ltsoap12binding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoap12operation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoap12body use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoap12body use=literal gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpGet type=tnsCurrencyConvertorHttpGetgt
lthttpbinding verb=GET gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
lthttpurlEncoded gt
ltwsdlinputgt
- ltwsdloutputgt
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpPost
type=tnsCurrencyConvertorHttpPostgt
lthttpbinding verb=POST gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
ltmimecontent type=applicationx-www-form-urlencoded gt
ltwsdlinputgt
- ltwsdloutputgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 15
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
---------------------Remove Binding Upto Here--------------------
- ltwsdlservice name=CurrencyConvertorgt
- ltwsdlport name=CurrencyConvertorSoap binding=tnsCurrencyConvertorSoapgt
ltsoapaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------Start Removing The PORT from Here------------------
- ltwsdlport name=CurrencyConvertorSoap12 binding=tnsCurrencyConvertorSoap12gt
ltsoap12address location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpGet binding=tnsCurrencyConvertorHttpGetgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpPost
binding=tnsCurrencyConvertorHttpPostgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------------------Remove Port Upto Here----------------------
ltwsdlservicegt
ltwsdldefinitionsgt
So now the initial preparation is over and name the WSDL file as testCurrencyconverterwsdl
Login into the SAP system and we have to perform basically two jobs to use the service offered by the Currency Convertor webservice
The creation of consumer proxy
Logical endpoint creation in SOAMANAGER for the consumer proxy
Open SE80 transaction and follow the steps shown in the screenshot below to create consumer proxy
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 16
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 17
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 18
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 19
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 20
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 21
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 22
Now we go to SOAMANAGER and create a logical end point for the consumer proxy Follow the screenshots for the same
SOAMANGER opens the transaction in a browser perform the below mentioned steps
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 10
- ltwsdlportType name=CurrencyConvertorSoapgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 11
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateSoapIn gt
ltwsdloutput message=tnsConversionRateSoapOut gt
ltwsdloperationgt
ltwsdlportTypegt
------------Start Removing The Operarion from here-------------
- ltwsdlportType name=CurrencyConvertorHttpGetgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 12
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpGetIn gt
ltwsdloutput message=tnsConversionRateHttpGetOut gt
ltwsdloperationgt
ltwsdlportTypegt
- ltwsdlportType name=CurrencyConvertorHttpPostgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 13
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpPostIn gt
ltwsdloutput message=tnsConversionRateHttpPostOut gt
ltwsdloperationgt
ltwsdlportTypegt
--------------------Remove Operation Up to here------------------
- ltwsdlbinding name=CurrencyConvertorSoap type=tnsCurrencyConvertorSoapgt
ltsoapbinding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoapoperation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoapbody use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoapbody use=literal gt
ltwsdloutputgt
ltwsdloperationgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 14
ltwsdlbindinggt
---------------Start Removing The Binding from Here-------------
- ltwsdlbinding name=CurrencyConvertorSoap12 type=tnsCurrencyConvertorSoapgt
ltsoap12binding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoap12operation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoap12body use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoap12body use=literal gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpGet type=tnsCurrencyConvertorHttpGetgt
lthttpbinding verb=GET gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
lthttpurlEncoded gt
ltwsdlinputgt
- ltwsdloutputgt
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpPost
type=tnsCurrencyConvertorHttpPostgt
lthttpbinding verb=POST gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
ltmimecontent type=applicationx-www-form-urlencoded gt
ltwsdlinputgt
- ltwsdloutputgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 15
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
---------------------Remove Binding Upto Here--------------------
- ltwsdlservice name=CurrencyConvertorgt
- ltwsdlport name=CurrencyConvertorSoap binding=tnsCurrencyConvertorSoapgt
ltsoapaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------Start Removing The PORT from Here------------------
- ltwsdlport name=CurrencyConvertorSoap12 binding=tnsCurrencyConvertorSoap12gt
ltsoap12address location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpGet binding=tnsCurrencyConvertorHttpGetgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpPost
binding=tnsCurrencyConvertorHttpPostgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------------------Remove Port Upto Here----------------------
ltwsdlservicegt
ltwsdldefinitionsgt
So now the initial preparation is over and name the WSDL file as testCurrencyconverterwsdl
Login into the SAP system and we have to perform basically two jobs to use the service offered by the Currency Convertor webservice
The creation of consumer proxy
Logical endpoint creation in SOAMANAGER for the consumer proxy
Open SE80 transaction and follow the steps shown in the screenshot below to create consumer proxy
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 16
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 17
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 18
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 19
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 20
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 21
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 22
Now we go to SOAMANAGER and create a logical end point for the consumer proxy Follow the screenshots for the same
SOAMANGER opens the transaction in a browser perform the below mentioned steps
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 11
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateSoapIn gt
ltwsdloutput message=tnsConversionRateSoapOut gt
ltwsdloperationgt
ltwsdlportTypegt
------------Start Removing The Operarion from here-------------
- ltwsdlportType name=CurrencyConvertorHttpGetgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 12
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpGetIn gt
ltwsdloutput message=tnsConversionRateHttpGetOut gt
ltwsdloperationgt
ltwsdlportTypegt
- ltwsdlportType name=CurrencyConvertorHttpPostgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 13
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpPostIn gt
ltwsdloutput message=tnsConversionRateHttpPostOut gt
ltwsdloperationgt
ltwsdlportTypegt
--------------------Remove Operation Up to here------------------
- ltwsdlbinding name=CurrencyConvertorSoap type=tnsCurrencyConvertorSoapgt
ltsoapbinding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoapoperation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoapbody use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoapbody use=literal gt
ltwsdloutputgt
ltwsdloperationgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 14
ltwsdlbindinggt
---------------Start Removing The Binding from Here-------------
- ltwsdlbinding name=CurrencyConvertorSoap12 type=tnsCurrencyConvertorSoapgt
ltsoap12binding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoap12operation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoap12body use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoap12body use=literal gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpGet type=tnsCurrencyConvertorHttpGetgt
lthttpbinding verb=GET gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
lthttpurlEncoded gt
ltwsdlinputgt
- ltwsdloutputgt
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpPost
type=tnsCurrencyConvertorHttpPostgt
lthttpbinding verb=POST gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
ltmimecontent type=applicationx-www-form-urlencoded gt
ltwsdlinputgt
- ltwsdloutputgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 15
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
---------------------Remove Binding Upto Here--------------------
- ltwsdlservice name=CurrencyConvertorgt
- ltwsdlport name=CurrencyConvertorSoap binding=tnsCurrencyConvertorSoapgt
ltsoapaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------Start Removing The PORT from Here------------------
- ltwsdlport name=CurrencyConvertorSoap12 binding=tnsCurrencyConvertorSoap12gt
ltsoap12address location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpGet binding=tnsCurrencyConvertorHttpGetgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpPost
binding=tnsCurrencyConvertorHttpPostgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------------------Remove Port Upto Here----------------------
ltwsdlservicegt
ltwsdldefinitionsgt
So now the initial preparation is over and name the WSDL file as testCurrencyconverterwsdl
Login into the SAP system and we have to perform basically two jobs to use the service offered by the Currency Convertor webservice
The creation of consumer proxy
Logical endpoint creation in SOAMANAGER for the consumer proxy
Open SE80 transaction and follow the steps shown in the screenshot below to create consumer proxy
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 16
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 17
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 18
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 19
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 20
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 21
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 22
Now we go to SOAMANAGER and create a logical end point for the consumer proxy Follow the screenshots for the same
SOAMANGER opens the transaction in a browser perform the below mentioned steps
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 12
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpGetIn gt
ltwsdloutput message=tnsConversionRateHttpGetOut gt
ltwsdloperationgt
ltwsdlportTypegt
- ltwsdlportType name=CurrencyConvertorHttpPostgt
- ltwsdloperation name=ConversionRategt
ltwsdldocumentation xmlnswsdl=httpschemasxmlsoaporgwsdlgtltbrgtltbgtGet
conversion rate from one currency to another currency ltbgtltbrgtltpgtltbgtltfont
color=000080 size=1 face=VerdanagtltugtDifferenct currency Code and Names
around the worldltugtltfontgtltbgtltpgtltblockquotegtltpgtltfont face=Verdana
size=1gtAFA-Afghanistan AfghaniltbrgtALL-Albanian LekltbrgtDZD-Algerian
DinarltbrgtARS-Argentine PesoltbrgtAWG-Aruba FlorinltbrgtAUD-Australian
DollarltbrgtBSD-Bahamian DollarltbrgtBHD-Bahraini DinarltbrgtBDT-Bangladesh
TakaltbrgtBBD-Barbados DollarltbrgtBZD-Belize DollarltbrgtBMD-Bermuda
DollarltbrgtBTN-Bhutan NgultrumltbrgtBOB-Bolivian BolivianoltbrgtBWP-Botswana
PulaltbrgtBRL-Brazilian RealltbrgtGBP-British PoundltbrgtBND-Brunei DollarltbrgtBIF-
Burundi FrancltbrgtXOF-CFA Franc (BCEAO)ltbrgtXAF-CFA Franc (BEAC)ltbrgtKHR-
Cambodia RielltbrgtCAD-Canadian DollarltbrgtCVE-Cape Verde EscudoltbrgtKYD-
Cayman Islands DollarltbrgtCLP-Chilean PesoltbrgtCNY-Chinese YuanltbrgtCOP-
Colombian PesoltbrgtKMF-Comoros FrancltbrgtCRC-Costa Rica ColonltbrgtHRK-
Croatian KunaltbrgtCUP-Cuban PesoltbrgtCYP-Cyprus PoundltbrgtCZK-Czech
KorunaltbrgtDKK-Danish KroneltbrgtDJF-Dijibouti FrancltbrgtDOP-Dominican
PesoltbrgtXCD-East Caribbean DollarltbrgtEGP-Egyptian PoundltbrgtSVC-El Salvador
ColonltbrgtEEK-Estonian KroonltbrgtETB-Ethiopian BirrltbrgtEUR-EuroltbrgtFKP-
Falkland Islands PoundltbrgtGMD-Gambian DalasiltbrgtGHC-Ghanian CediltbrgtGIP-
Gibraltar PoundltbrgtXAU-Gold OuncesltbrgtGTQ-Guatemala QuetzalltbrgtGNF-Guinea
FrancltbrgtGYD-Guyana DollarltbrgtHTG-Haiti GourdeltbrgtHNL-Honduras
LempiraltbrgtHKD-Hong Kong DollarltbrgtHUF-Hungarian ForintltbrgtISK-Iceland
KronaltbrgtINR-Indian RupeeltbrgtIDR-Indonesian RupiahltbrgtIQD-Iraqi
DinarltbrgtILS-Israeli ShekelltbrgtJMD-Jamaican DollarltbrgtJPY-Japanese
YenltbrgtJOD-Jordanian DinarltbrgtKZT-Kazakhstan TengeltbrgtKES-Kenyan
ShillingltbrgtKRW-Korean WonltbrgtKWD-Kuwaiti DinarltbrgtLAK-Lao KipltbrgtLVL-
Latvian LatltbrgtLBP-Lebanese PoundltbrgtLSL-Lesotho LotiltbrgtLRD-Liberian
DollarltbrgtLYD-Libyan DinarltbrgtLTL-Lithuanian LitaltbrgtMOP-Macau
PatacaltbrgtMKD-Macedonian DenarltbrgtMGF-Malagasy FrancltbrgtMWK-Malawi
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 13
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpPostIn gt
ltwsdloutput message=tnsConversionRateHttpPostOut gt
ltwsdloperationgt
ltwsdlportTypegt
--------------------Remove Operation Up to here------------------
- ltwsdlbinding name=CurrencyConvertorSoap type=tnsCurrencyConvertorSoapgt
ltsoapbinding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoapoperation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoapbody use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoapbody use=literal gt
ltwsdloutputgt
ltwsdloperationgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 14
ltwsdlbindinggt
---------------Start Removing The Binding from Here-------------
- ltwsdlbinding name=CurrencyConvertorSoap12 type=tnsCurrencyConvertorSoapgt
ltsoap12binding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoap12operation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoap12body use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoap12body use=literal gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpGet type=tnsCurrencyConvertorHttpGetgt
lthttpbinding verb=GET gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
lthttpurlEncoded gt
ltwsdlinputgt
- ltwsdloutputgt
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpPost
type=tnsCurrencyConvertorHttpPostgt
lthttpbinding verb=POST gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
ltmimecontent type=applicationx-www-form-urlencoded gt
ltwsdlinputgt
- ltwsdloutputgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 15
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
---------------------Remove Binding Upto Here--------------------
- ltwsdlservice name=CurrencyConvertorgt
- ltwsdlport name=CurrencyConvertorSoap binding=tnsCurrencyConvertorSoapgt
ltsoapaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------Start Removing The PORT from Here------------------
- ltwsdlport name=CurrencyConvertorSoap12 binding=tnsCurrencyConvertorSoap12gt
ltsoap12address location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpGet binding=tnsCurrencyConvertorHttpGetgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpPost
binding=tnsCurrencyConvertorHttpPostgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------------------Remove Port Upto Here----------------------
ltwsdlservicegt
ltwsdldefinitionsgt
So now the initial preparation is over and name the WSDL file as testCurrencyconverterwsdl
Login into the SAP system and we have to perform basically two jobs to use the service offered by the Currency Convertor webservice
The creation of consumer proxy
Logical endpoint creation in SOAMANAGER for the consumer proxy
Open SE80 transaction and follow the steps shown in the screenshot below to create consumer proxy
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 16
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 17
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 18
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 19
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 20
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 21
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 22
Now we go to SOAMANAGER and create a logical end point for the consumer proxy Follow the screenshots for the same
SOAMANGER opens the transaction in a browser perform the below mentioned steps
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 13
KwachaltbrgtMYR-Malaysian RinggitltbrgtMVR-Maldives RufiyaaltbrgtMTL-Maltese
LiraltbrgtMRO-Mauritania OugulyaltbrgtMUR-Mauritius RupeeltbrgtMXN-Mexican
PesoltbrgtMDL-Moldovan LeultbrgtMNT-Mongolian TugrikltbrgtMAD-Moroccan
DirhamltbrgtMZM-Mozambique MeticalltbrgtMMK-Myanmar KyatltbrgtNAD-Namibian
DollarltbrgtNPR-Nepalese RupeeltbrgtANG-Neth Antilles GuilderltbrgtNZD-New
Zealand DollarltbrgtNIO-Nicaragua CordobaltbrgtNGN-Nigerian NairaltbrgtKPW-North
Korean WonltbrgtNOK-Norwegian KroneltbrgtOMR-Omani RialltbrgtXPF-Pacific
FrancltbrgtPKR-Pakistani RupeeltbrgtXPD-Palladium OuncesltbrgtPAB-Panama
BalboaltbrgtPGK-Papua New Guinea KinaltbrgtPYG-Paraguayan GuaraniltbrgtPEN-
Peruvian Nuevo SolltbrgtPHP-Philippine PesoltbrgtXPT-Platinum OuncesltbrgtPLN-
Polish ZlotyltbrgtQAR-Qatar RialltbrgtROL-Romanian LeultbrgtRUB-Russian
RoubleltbrgtWST-Samoa TalaltbrgtSTD-Sao Tome DobraltbrgtSAR-Saudi Arabian
RiyalltbrgtSCR-Seychelles RupeeltbrgtSLL-Sierra Leone LeoneltbrgtXAG-Silver
OuncesltbrgtSGD-Singapore DollarltbrgtSKK-Slovak KorunaltbrgtSIT-Slovenian
TolarltbrgtSBD-Solomon Islands DollarltbrgtSOS-Somali ShillingltbrgtZAR-South
African RandltbrgtLKR-Sri Lanka RupeeltbrgtSHP-St Helena PoundltbrgtSDD-Sudanese
DinarltbrgtSRG-Surinam GuilderltbrgtSZL-Swaziland LilageniltbrgtSEK-Swedish
KronaltbrgtTRY-Turkey LiraltbrgtCHF-Swiss FrancltbrgtSYP-Syrian PoundltbrgtTWD-
Taiwan DollarltbrgtTZS-Tanzanian ShillingltbrgtTHB-Thai BahtltbrgtTOP-Tonga
PaangaltbrgtTTD-TrinidadampampampTobago DollarltbrgtTND-Tunisian
DinarltbrgtTRL-Turkish LiraltbrgtUSD-US DollarltbrgtAED-UAE DirhamltbrgtUGX-
Ugandan ShillingltbrgtUAH-Ukraine HryvnialtbrgtUYU-Uruguayan New PesoltbrgtVUV-
Vanuatu VatultbrgtVEB-Venezuelan BolivarltbrgtVND-Vietnam DongltbrgtYER-Yemen
RiyalltbrgtYUM-Yugoslav DinarltbrgtZMK-Zambian KwachaltbrgtZWD-Zimbabwe
Dollarltfontgtltpgtltblockquotegtltwsdldocumentationgt
ltwsdlinput message=tnsConversionRateHttpPostIn gt
ltwsdloutput message=tnsConversionRateHttpPostOut gt
ltwsdloperationgt
ltwsdlportTypegt
--------------------Remove Operation Up to here------------------
- ltwsdlbinding name=CurrencyConvertorSoap type=tnsCurrencyConvertorSoapgt
ltsoapbinding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoapoperation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoapbody use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoapbody use=literal gt
ltwsdloutputgt
ltwsdloperationgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 14
ltwsdlbindinggt
---------------Start Removing The Binding from Here-------------
- ltwsdlbinding name=CurrencyConvertorSoap12 type=tnsCurrencyConvertorSoapgt
ltsoap12binding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoap12operation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoap12body use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoap12body use=literal gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpGet type=tnsCurrencyConvertorHttpGetgt
lthttpbinding verb=GET gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
lthttpurlEncoded gt
ltwsdlinputgt
- ltwsdloutputgt
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpPost
type=tnsCurrencyConvertorHttpPostgt
lthttpbinding verb=POST gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
ltmimecontent type=applicationx-www-form-urlencoded gt
ltwsdlinputgt
- ltwsdloutputgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 15
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
---------------------Remove Binding Upto Here--------------------
- ltwsdlservice name=CurrencyConvertorgt
- ltwsdlport name=CurrencyConvertorSoap binding=tnsCurrencyConvertorSoapgt
ltsoapaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------Start Removing The PORT from Here------------------
- ltwsdlport name=CurrencyConvertorSoap12 binding=tnsCurrencyConvertorSoap12gt
ltsoap12address location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpGet binding=tnsCurrencyConvertorHttpGetgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpPost
binding=tnsCurrencyConvertorHttpPostgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------------------Remove Port Upto Here----------------------
ltwsdlservicegt
ltwsdldefinitionsgt
So now the initial preparation is over and name the WSDL file as testCurrencyconverterwsdl
Login into the SAP system and we have to perform basically two jobs to use the service offered by the Currency Convertor webservice
The creation of consumer proxy
Logical endpoint creation in SOAMANAGER for the consumer proxy
Open SE80 transaction and follow the steps shown in the screenshot below to create consumer proxy
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 16
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 17
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 18
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 19
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 20
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 21
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 22
Now we go to SOAMANAGER and create a logical end point for the consumer proxy Follow the screenshots for the same
SOAMANGER opens the transaction in a browser perform the below mentioned steps
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 14
ltwsdlbindinggt
---------------Start Removing The Binding from Here-------------
- ltwsdlbinding name=CurrencyConvertorSoap12 type=tnsCurrencyConvertorSoapgt
ltsoap12binding transport=httpschemasxmlsoaporgsoaphttp gt
- ltwsdloperation name=ConversionRategt
ltsoap12operation soapAction=httpwwwwebserviceXNETConversionRate
style=document gt
- ltwsdlinputgt
ltsoap12body use=literal gt
ltwsdlinputgt
- ltwsdloutputgt
ltsoap12body use=literal gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpGet type=tnsCurrencyConvertorHttpGetgt
lthttpbinding verb=GET gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
lthttpurlEncoded gt
ltwsdlinputgt
- ltwsdloutputgt
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
- ltwsdlbinding name=CurrencyConvertorHttpPost
type=tnsCurrencyConvertorHttpPostgt
lthttpbinding verb=POST gt
- ltwsdloperation name=ConversionRategt
lthttpoperation location=ConversionRate gt
- ltwsdlinputgt
ltmimecontent type=applicationx-www-form-urlencoded gt
ltwsdlinputgt
- ltwsdloutputgt
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 15
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
---------------------Remove Binding Upto Here--------------------
- ltwsdlservice name=CurrencyConvertorgt
- ltwsdlport name=CurrencyConvertorSoap binding=tnsCurrencyConvertorSoapgt
ltsoapaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------Start Removing The PORT from Here------------------
- ltwsdlport name=CurrencyConvertorSoap12 binding=tnsCurrencyConvertorSoap12gt
ltsoap12address location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpGet binding=tnsCurrencyConvertorHttpGetgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpPost
binding=tnsCurrencyConvertorHttpPostgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------------------Remove Port Upto Here----------------------
ltwsdlservicegt
ltwsdldefinitionsgt
So now the initial preparation is over and name the WSDL file as testCurrencyconverterwsdl
Login into the SAP system and we have to perform basically two jobs to use the service offered by the Currency Convertor webservice
The creation of consumer proxy
Logical endpoint creation in SOAMANAGER for the consumer proxy
Open SE80 transaction and follow the steps shown in the screenshot below to create consumer proxy
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 16
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 17
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 18
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 19
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 20
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 21
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 22
Now we go to SOAMANAGER and create a logical end point for the consumer proxy Follow the screenshots for the same
SOAMANGER opens the transaction in a browser perform the below mentioned steps
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 15
ltmimemimeXml part=Body gt
ltwsdloutputgt
ltwsdloperationgt
ltwsdlbindinggt
---------------------Remove Binding Upto Here--------------------
- ltwsdlservice name=CurrencyConvertorgt
- ltwsdlport name=CurrencyConvertorSoap binding=tnsCurrencyConvertorSoapgt
ltsoapaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------Start Removing The PORT from Here------------------
- ltwsdlport name=CurrencyConvertorSoap12 binding=tnsCurrencyConvertorSoap12gt
ltsoap12address location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpGet binding=tnsCurrencyConvertorHttpGetgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
- ltwsdlport name=CurrencyConvertorHttpPost
binding=tnsCurrencyConvertorHttpPostgt
lthttpaddress location=httpwwwwebservicexnetCurrencyConvertorasmx gt
ltwsdlportgt
------------------------Remove Port Upto Here----------------------
ltwsdlservicegt
ltwsdldefinitionsgt
So now the initial preparation is over and name the WSDL file as testCurrencyconverterwsdl
Login into the SAP system and we have to perform basically two jobs to use the service offered by the Currency Convertor webservice
The creation of consumer proxy
Logical endpoint creation in SOAMANAGER for the consumer proxy
Open SE80 transaction and follow the steps shown in the screenshot below to create consumer proxy
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 16
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 17
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 18
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 19
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 20
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 21
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 22
Now we go to SOAMANAGER and create a logical end point for the consumer proxy Follow the screenshots for the same
SOAMANGER opens the transaction in a browser perform the below mentioned steps
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 16
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 17
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 18
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 19
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 20
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 21
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 22
Now we go to SOAMANAGER and create a logical end point for the consumer proxy Follow the screenshots for the same
SOAMANGER opens the transaction in a browser perform the below mentioned steps
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 17
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 18
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 19
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 20
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 21
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 22
Now we go to SOAMANAGER and create a logical end point for the consumer proxy Follow the screenshots for the same
SOAMANGER opens the transaction in a browser perform the below mentioned steps
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 18
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 19
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 20
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 21
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 22
Now we go to SOAMANAGER and create a logical end point for the consumer proxy Follow the screenshots for the same
SOAMANGER opens the transaction in a browser perform the below mentioned steps
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 19
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 20
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 21
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 22
Now we go to SOAMANAGER and create a logical end point for the consumer proxy Follow the screenshots for the same
SOAMANGER opens the transaction in a browser perform the below mentioned steps
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 20
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 21
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 22
Now we go to SOAMANAGER and create a logical end point for the consumer proxy Follow the screenshots for the same
SOAMANGER opens the transaction in a browser perform the below mentioned steps
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 21
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 22
Now we go to SOAMANAGER and create a logical end point for the consumer proxy Follow the screenshots for the same
SOAMANGER opens the transaction in a browser perform the below mentioned steps
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 22
Now we go to SOAMANAGER and create a logical end point for the consumer proxy Follow the screenshots for the same
SOAMANGER opens the transaction in a browser perform the below mentioned steps
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 23
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 24
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 25
Actually in some organizations the internet communication is via proxy get the proxy and port respectively and fill the above parameters if required
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 26
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 27
PROGRAM
amp---------------------------------------------------------------------
amp Report YTEST1
amp
amp---------------------------------------------------------------------
amp Program to test webservice
amp
amp---------------------------------------------------------------------
REPORT YTEST1
Create the reference variable of type proxy class
data testobj type ref to ZASCO_CURRENCY_CONVERTOR_SOAP
Data sys_fault type ref to cx_ai_system_fault
app_fault type ref to cx_ai_application_fault
l_exception_msg type string
try
create object testobj EXPORTING
LOGICAL_PORT_NAME = TEST_WS
catch cx_ai_system_fault
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 28
endtry
Declare the variable from consumer proxy class CONVERSION_RATE method
interface
data input type ZASCONVERSION_RATE_SOAP_IN
output type ZASCONVERSION_RATE_SOAP_OUT
input-FROM_CURRENCY = USD
input-TO_CURRENCY = INR
try
Call method CONVERSION_RATE
call method testobj-gtCONVERSION_RATE
exporting
input = input
importing
output = output
catch cx_ai_system_fault into sys_fault
l_exception_msg = sys_fault-gtget_text( )
write System Error l_exception_msg
exit
catch cx_ai_application_fault into app_fault
l_exception_msg = app_fault-gtget_text( )
write Application Error l_exception_msg
exit
endtry
print the result
write output-CONVERSION_RATE_RESULT
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 29
Troubleshooting
Now lets focus on some basic troubleshooting
ICM_HTTP_TIMEOUT
ICM_HTTP_CONNECTION_FAILED
This error comes when we forget to mention proxy and port in logical endpoint
SOAP FAULTCODE 1
This error comes if MESSAGE ID PROTOCOL value is wrongly choosen in the logical end point creation
Please refer the below references for more explanation on troubleshooting
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 30
Related Content
httpscwsdnsapcomcwdocsDOC-106375
httpforumssdnsapcommessagejspamessageID=5686394
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document
Consuming the External Web Service in SAP Environment
SAP COMMUNITY NETWORK SDN - sdnsapcom | BPX - bpxsapcom | BOC - bocsapcom | UAC - uacsapcom
copy 2010 SAP AG 31
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP Changes made based on this information are not supported and can be overwritten during an upgrade
SAP will not be held liable for any damages caused by using or misusing the information code or methods suggested in this document and anyone using these methods does so at hisher own risk
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP You agree that you will not hold or seek to hold SAP responsible or liable with respect to the content of this document