How-toGuideSAPNetWeaver‘04HowToDevelopaSimpleWebServiceApplicationUsingSAPNetWeaverDeveloperStudio&SAPXI3.0Version1.00–Nov2005ApplicableReleases:SAPNetWeaver’04SPS13andabove©Copyright2005SAPAG.Allrightsreserved.NopartofthispublicationmaybereproducedortransmittedinanyformorforanypurposewithouttheexpresspermissionofSAPAG.Theinformationcontainedhereinmaybechangedwithoutpriornotice.SomesoftwareproductsmarketedbySAPAGanditsdistributorscontainproprietarysoftwarecomponentsofothersoftwarevendors.Microsoft,Windows,Outlook,andPowerPointareregisteredtrademarksofMicrosoftCorporation.IBM,DB2,DB2UniversalDatabase,OS/2,ParallelSysplex,MVS/ESA,AIX,S/390,AS/400,OS/390,OS/400,iSeries,pSeries,xSeries,zSeries,z/OS,AFP,IntelligentMiner,WebSphere,Netfinity,Tivoli,andInformixaretrademarksorregisteredtrademarksofIBMCorporationintheUnitedStatesand/orothercountries.OracleisaregisteredtrademarkofOracleCorporation.UNIX,X/Open,OSF/1,andMotifareregisteredtrademarksoftheOpenGroup.Citrix,ICA,ProgramNeighborhood,MetaFrame,WinFrame,VideoFrame,andMultiWinaretrademarksorregisteredtrademarksofCitrixSystems,Inc.HTML,XML,XHTMLandW3CaretrademarksorregisteredtrademarksofW3C®,WorldWideWebConsortium,MassachusettsInstituteofTechnology.JavaisaregisteredtrademarkofSunMicrosystems,Inc.JavaScriptisaregisteredtrademarkofSunMicrosystems,Inc.,usedunderlicensefortechnologyinventedandimplementedbyNetscape.MaxDBisatrademarkofMySQLAB,Sweden.SAP,R/3,mySAP,mySAP.com,xApps,xApp,SAPNetWeaver,andotherSAPproductsandservicesmentionedhereinaswellastheirrespectivelogosaretrademarksorregisteredtrademarksofSAPAGinGermanyandinseveralothercountriesallovertheworld.Allotherproductandservicenamesmentionedarethetrademarksoftheirrespectivecompanies.Datacontainedinthisdocumentservesinformationalpurposesonly.Nationalproductspecificationsmayvary.Thesematerialsaresubjecttochangewithoutnotice.ThesematerialsareprovidedbySAPAGanditsaffiliatedcompanies(SAPGroup)forinformationalpurposesonly,withoutrepresentationorwarrantyofanykind,andSAPGroupshallnotbeliableforerrorsoromissionswithrespecttothematerials.TheonlywarrantiesforSAPGroupproductsandservicesarethosethataresetforthintheexpresswarrantystatementsaccompanyingsuchproductsandservices,ifany.Nothinghereinshouldbeconstruedasconstitutinganadditionalwarranty.Thesematerialsareprovided“asis”withoutawarrantyofanykind,eitherexpressorimplied,includingbutnotlimitedto,theimpliedwarrantiesofmerchantability,fitnessforaparticularpurpose,ornon-infringement.SAPshallnotbeliablefordamagesofanykindincludingwithoutlimitationdirect,special,indirect,orconsequentialdamagesthatmayresultfromtheuseofthesematerials.SAPdoesnotwarranttheaccuracyorcompletenessoftheinformation,text,graphics,linksorotheritemscontainedwithinthesematerials.SAPhasnocontrolovertheinformationthatyoumayaccessthroughtheuseofhotlinkscontainedinthesematerialsanddoesnotendorseyouruseofthirdpartywebpagesnorprovideanywarrantywhatsoeverrelatingtothirdpartywebpages.SAPNetWeaver“How-to”Guidesareintendedtosimplifytheproductimplementation.Whilespecificproductfeaturesandprocedurestypicallyareexplainedinapracticalbusinesscontext,itisnotimpliedthatthosefeaturesandproceduresaretheonlyapproachinsolvingaspecificbusinessproblemusingSAPNetWeaver.Shouldyouwishtoreceiveadditionalinformation,clarificationorsupport,pleaserefertoSAPConsulting.TableofContents1Scenario...............................................................................................................12Introduction...........................................................................................................13TheStep-By-StepSolution...................................................................................23.1GenerateaWSDLFileinXI3.0fromanExistingInterfaceDefinedintheIntegrationRepository..............................................................................................23.2ImporttheGeneratedWSDLFileintoSAPNWDSandCreateaWebServiceModel...........................................................................................................33.3DesignaSimpleJavaWebDynproApplicationBasedontheWebServiceModel.....................................................................................................................54Summary:...........................................................................................................11Appendix:MessageMonitoring..................................................................................12-1-1ScenarioYoudevelopaJavaWebDynproclientapplicationbyusingSAPNetWeaverDeveloperStudio(NWDS),importingtheWebserviceinterfacedefinedinSAPExchangeInfrastructure(XI)3.0,anddeployingitonaJ2EEEngine.2IntroductionInXI3.0,anyoutboundinterfacecanbeexposedasaWebserviceinterface.AWebservicedescription(WSDLfile)canbegeneratedforthisinterfaceintheIntegrationDirectoryandyoucandevelopaWebserviceapplication(J2EEor.Net)basedonthedatatypesdefinedintheWSDLfile.InXI3.0,youcanalsocallaWebserviceapplicationbyusingtheSOAPadapterandsimplyimportthereceiverapplicationWSDLinterfaceasanexternalde