7-1-2 Integration Server and Developer Documentation Supplement

Embed Size (px)

Citation preview

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    1/26

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    2/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    ISDEV-DS-712-20080926 2

    Thenewservicehandlerfeatureprovidesthefollowing:

    Asingle,unifiedheaderhandlerthatyoucanimplementusingfloworJavaservices.

    Handlerpublicservicesforadministrativeandruntimetasks.

    Unified Header Handler

    YouimplementthebusinesslogicforservicehandlersthroughfloworJavaservicesthatyoucreateto:

    Handlearequest

    Handlearesponse

    Handleafault

    TheimplementationsyoubuildwillcorrespondtotheJAXRPChandleRequest,handleResponse,andhandleFaultmethods.Notethatyoudonotneedtowrite

    implementationsfor

    all

    three

    services

    to

    include

    in

    the

    header

    handler

    (for

    example,

    your

    headerhandlercanincludeimplementationsforhandlingarequestandhandlingafault,butnothandlingaresponse).

    Athandlerregistrationtime,IntegrationServeracceptsthename(s)oftheservicesimplementingthebusinesslogiclistedabove.Atruntime,IntegrationServerinvokestheappropriateserviceorservicesduringhandlerprocessing.

    Service Handler Public Services

    Whenbuildingconsumerandproviderheaderhandlers,youusethehandlerpublicservicestodefinetheservicesthatperformtherequest,response,andfaulthandlingthat

    occursatinvocationtime.Thepub.soap.handlerfolder,whichispartoftheWmPublicpackage,contains:

    Administrativeservicesthatcoverregistration(andunregistration)ofthehandlers.

    RuntimeservicesthatallowyoutoaccessandmanipulatetheSOAPbodyorheaderelementsthroughthemessagecontext.Usingtheruntimeservicesyoucan:

    Addandremoveheaderelements

    SetandgetaSOAPmessage

    Setandgetpropertyvalues

    Deleteaproperty

    Formoreinformationaboutthebuiltinservicesforwritingserviceheaderhandlers,seeServicesforCreatingandRegisteringHeaderHandlersonpage 8.

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    3/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    ISDEV-DS-712-20080926 3

    Sett ing Up a Header Handler

    Tocreateandimplementaheaderhandler,youneedtobuildtheservicesforhandlingarequest,handlingaresponse,andhandlingafault.Youthenneedtoregisterthecombinationofthoseservicesasaservicebasedheaderhandler.

    Afteryouhavebuilttheservicesandregisteredthehandler,youcanassignthenewheaderhandlertotheexistingWSDinwhichitwilloperate.

    Building the Services

    InDeveloper,buildtheservicestohandleyourrequest,response,andfaultimplementations,usingthenewhandlerruntimepublicservices.Asampleheader

    handlerrequestimplementation(consumer.consumerHandler:handleRequest) foraconsumerhandler,withaviewofthefoldercontents,isshownbelow:

    Note: TheinformationinthissectionsupplementsthecontentsoftheWebServicesDevelopersGuide.

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    4/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    ISDEV-DS-712-20080926 4

    Registering the Handler

    Registerthehandleraseitheraconsumerorproviderusingpub.soap.handler:registerWmConsumerorpub.soap.handler:registerWmProvider, respectively.Duringregistration:

    Youprovidealogicalnameforthehandler.

    YouspecifythelistofQNamesonwhichthehandleroperates.

    Youspecifytheservicesforhandlingarequest,aresponse,andafaultasinput.

    Example: Measuring Elapsed Time with a Consumer Handler

    FollowingisanexampleofaconsumerservicehandlerthatmeasurestheelapsedtimebetweentheissuingofaSOAPrequestmessageanditsresponse.

    Thefollowingtabledescribesthesequenceofevents.

    Step Description

    1 AconsumerhandlercontainingahandleRequestandhandleResponseimplementationisregisteredandassignedtoaConsumerWSD.

    2 handleRequestinvokestheservicepub.date:getCurrentDateString togetthetimeatwhichtheoutgoingrequestissenttotheWebserviceprovider.handleRequestthenusessoap.handler:setPropertytoinsertthevalueintoadefinedkeynamedTimeintheclientmessagecontext.

    3 handleResponseisinvokedwhenthemessageflowreturnstotheclientside.

    Duringinvocation,theservicepub.date:getCurrentDateStringgetsthepresenttime,andthenusespub.soap.handler:getPropertyagainsttheTimekeytoretrievethepreviouslystoredvalueinthemessagecontext.

    ThedifferencebetweenthetwovaluesindicatestheapproximatetimetakentoexecutetheWebservice.

    handleRequest

    1

    2

    3Web Service

    Consumer

    Web Service

    ProviderhandleResponse

    Consumer handler

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    5/26

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    6/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    ISDEV-DS-712-20080926 6

    ns1:fieldName StringNameofthefirstfieldintheheaderelement(block)

    Note: Theprefixns1isaplaceholderandwillbereplacedbytheprefixof

    thechild

    element

    of

    the

    header

    element(block).Likewise,fieldNameisaplaceholderandwillbereplacedbythelocalnameofthefirstchildelementcontainedintheheaderelement(block).

    nsDecls DocumentNamespacesassociatedwithanynamespaceprefixesthatareusedinthechildelementnamesinHDRDOC1:localName.EachentryinnsDeclsrepresentsanamespaceprefix/URIpair,whereakeynamerepresentsaprefixandthevalueofthekeyspecifiesthenamespaceURI.

    Key Description

    ns1 StringNamespacedeclarationassociatedwiththeprefixns1,wherens1isaplaceholderandwillbereplacedbytheprefixusedwiththefirstchildelementofthe

    headerelement(block).nsDecls DocumentNamespacesassociatedwithany

    namespaceprefixesusedbytheheaderelements(blocks).

    Note: ThisdocumentwillcontainachildstringnamedHDRDOC#foreachnamespaceprefixusedwithaheaderelement(block).

    Key Description

    HDRDOC1 StringNamespacedeclaration

    associated

    with

    the

    prefix

    HDRDOC1.

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    7/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    ISDEV-DS-712-20080926 7

    Example of SOAP Headers in the Pipeline

    Forexample,supposethatanISserviceinvokedasaWebservicereceivedthisSOAPrequest:

    Value of firstField in firstHdr

    Value of firstField in secondHdr

    ...

    IntegrationServer

    creates

    asoapHeaders

    document

    that

    looks

    like

    this

    and

    adds

    itto

    the

    inputpipelineoftheISservice:

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    8/26

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    9/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    ISDEV-DS-712-20080926 9

    pub.soap.handler:addHeaderElement

    WmPublic.InsertsadocumentintoaSOAPmessageasanewheaderelement(block).

    Input Parameters

    pub.soap.handler:registerWmProvider WmPublic.RegistersaheaderhandlerforusewithproviderWebservicedescriptors.

    pub.soap.handler:removeHeaderElement WmPublic.Removesaheaderelement(block)fromaSOAPmessage.

    pub.soap.handler:removeProperty WmPublic.Removesapropertyfromamessagecontext.

    pub.soap.handler:setProperty WmPublic.Setsthevalueofaspecificpropertyinamessagecontext.

    pub.soap.handler:setSOAPMessage WmPublic.SetstheSOAPmessageinamessagecontext.

    pub.universalName:findDocumentType WmPublic.Returnsthefullyqualifieddocumenttypenameforaprovidedexplicituniversal

    name.pub.universalName:listAll WmPublic.Returnsthecontentsofthecurrent

    universalnameregistry,includingservicesanddocumenttypes.

    Note: Thefollowingservicesaredeprecated:pub.soap.handler:registerConsumerandpub.soap.handler:registerProvider.

    messageContext Object MessagecontextcontainingtheSOAPmessagetowhichtoaddaheaderelement.

    AmessagecontextcontainspropertiesfortheSOAPmessageandprovidesaccesstotheSOAPmessage.IntegrationServercreatesthemessagecontextandpassesittotheheaderhandler.AllhandlersinvokedbyagiveninstanceofaSOAPrequestorSOAPresponseusethesamemessagecontext,whichenablesyoutousethe

    messagecontext

    to

    pass

    information

    among

    handlers.

    Element Description

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    10/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    ISDEV-DS-712-20080926 10

    QName DocumentOptional.Qualifiedname(namespacenameandlocalname)oftheheaderelementtoadd.

    TheQNamedocumentreferencesthepub.soap.utils:QNamedocumenttype.Formoreinformationaboutpub.soap.utils:QName,seethe

    webMethods

    Integration

    Server

    Built

    In

    Services

    Reference.

    Note: IfyoudonotspecifyQNamevalue,youmustspecifydocumentType.

    headerDocument Document Documenttoaddasaheaderelement.IntegrationServerconvertsthedocumenttoanXMLnodeandinsertsitasachildelementoftheheaderelementspecifiedinQName.

    documentType StringOptional.NameoftheISdocumenttypethatspecifiesthestructureandnamespacesofthedocumenttouseasanewheaderelement.IntegrationServerusestheuniversalnameassignedtotheISdocumenttypetodeterminethequalifiednametouseforthenewheaderelement.IfyouspecifydocumentType,headerDocumentmustbeainstanceofthisdocumenttype.

    Note: IfyoudonotspecifydocumentType,youmustspecifyQName.

    mustUnderstand String Optional.SetsthevalueofthemustUnderstandattributeforthenewheaderelement(block).ThemustUnderstandattributespecifieswhetherrecipients(theactororroleatwhichtheheaderistargeted)arerequiredtoprocessaheaderentry.RecipientsthatcannotprocessamandatoryheaderentrymustrejectthemessageandreturnaSOAPfault.

    Set to... To...

    true Indicatethatprocessingtheheaderentryisoptional.

    false Indicatethatprocessingtheheaderentryismandatory.

    Thereisnodefaultvalue.

    IfyoudonotsetmustUnderstand,IntegrationServeromitsthemustUnderstandattributefromtheheaderentry,whichisequivalenttosettingmustUnderstandtofalse.

    Note: InSOAP1.2,thevaluesofthemustUnderstandattribute

    changedfrom

    0and

    1to

    True

    and

    False;

    however,

    Integration

    Server

    processesbothsetsofvaluesthesameandperformsanynecessaryconversions.

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    11/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    ISDEV-DS-712-20080926 11

    Output Parameters

    None.

    Usage Notes

    QNameanddocumentTypearemutuallyexclusive.Eventhoughtheparametersareoptional,youmustspecifyoneortheother.Ifyoudonotspecifyeither,IntegrationServerdisplaysthefollowingerror:

    [ISS.0088.9422] One of the mutually exclusive parameter QName or

    documentType is missing or invalid.

    IfyouspecifyvaluesforQNameanddocumentType,IntegrationServerusestheQNamevalueandignoresdocumentType.

    FormoreinformationaboutthemustUnderstandandactorattributesinSOAP1.1,seetheSimpleObjectAccessProtocol(SOAP)1.1 W3CNote08May2000athttp://www.w3.org/TR/SOAP/.

    FormoreinformationaboutthemustUnderstandandroleattributesinSOAP1.2,seetheSimpleObjectAccessProtocol(SOAP)1.2specificationathttp://www.w3.org/TR/SOAP12/.

    Example

    SupposethatmessageContextcontainsaSOAPmessagewithanemptySOAPheaderandyouwanttoaddaheaderelementbypassingthepub.soap:handler:addHeaderElementservicethefollowinginputparameters:

    actor String Optional.Targetoftheheaderentry.Thevalueofactordeterminesthevalueoftheactororroleattributefortheheaderentry.TheactororroleattributespecifiesaURIfortherecipientofaheaderentry.

    Ifyou

    do

    not

    specify

    avalue

    for

    actor,

    the

    actor

    or

    role

    attribute

    will

    beblankintheSOAPheader.InSOAP1.1,thisindicatesthattherecipientistheultimatedestinationoftheSOAPmessage.InSOAP1.2,thisisequivalenttosupplyingthatattributewiththevaluehttp://www.w3.org/2003/05/soapenvelope/role/ultimateReceiver .

    Note: InSOAP1.2,theactorattributeisnamedrole;however,IntegrationServerprocessesbothnamesthesameandperformsanynecessaryconversions.

    Input Parameter Provided Value

    QName namespaceName userHandlerNamespaceName

    localName userHandlerLocalName

    http://www.w3.org/TR/SOAP/http://www.w3.org/TR/SOAP12/http://www.w3.org/TR/SOAP12/http://www.w3.org/TR/SOAP/
  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    12/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    ISDEV-DS-712-20080926 12

    Executionofthepub.soap.handler:addHeaderElementserviceresultsinthisSOAPheaderforSOAP1.1:

    Value of myString field.

    ...

    IntegrationServerusesHDRasthenamespaceprefixforthenamespacenameoftheheader.

    See Alsopub.soap.handler:getHeaderElement

    pub.soap.handler:removeHeaderElement

    headerDocument AninstanceofdocumentTypes:myNewHeader,whichcontainsasinglefieldoftypeStringnamedmyString.ThevalueofmyStringis:Value of myString field.

    documentType Notprovided.

    mustUnderstand true

    actor soapActor

    Input Parameter Provided Value

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    13/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    ISDEV-DS-712-20080926 13

    pub.soap.handler:getHeaderElement

    WmPublic.RetrievesaheaderelementfromaSOAPmessage.

    Input Parameters

    Output Parameters

    Usage Notes

    QNameanddocumentTypearemutuallyexclusive.Eventhoughtheparametersareoptional,youmustspecifyoneortheother.Ifyoudonotspecifyeither,IntegrationServerdisplaysthefollowingerror:

    [ISS.0088.9422] One of the mutually exclusive parameter QName ordocumentType is missing or invalid.

    IfyouspecifyvaluesforQNameanddocumentType,IntegrationServerusesQNameandignoresdocumentType.

    messageContext ObjectMessagecontextcontainingtheSOAPmessagefromwhichtoretrieveaheaderelement.

    AmessagecontextcontainspropertiesfortheSOAPmessageandprovidesaccesstotheSOAPmessage.IntegrationServercreatesthemessagecontextandpassesittotheheaderhandler.AllhandlersinvokedbyagiveninstanceofaSOAPrequestorSOAPresponseusethesamemessagecontext,whichenablesyoutousethemessagecontexttopassinformationamonghandlers.

    QName DocumentOptional.Qualifiedname(namespacenameandlocalname)oftheheaderelementtoretrieve.

    TheQNamedocumentreferencesthepub.soap.utils:QNamedocumenttype.Formoreinformationaboutpub.soap.utils:QName,seethewebMethodsIntegrationServerBuiltInServicesReference.

    IfyoudonotspecifyQName,youmustspecifydocumentType.

    documentType String Optional.FullyqualifiednameoftheISdocumenttypethatspecifiesthestructuretoimposeontheresultingdocument.IntegrationServerusestheexplicituniversalnameassignedtothedocumenttypetodeterminewhichheaderelementtoretrievefromtheSOAPmessage.

    Ifyou

    do

    not

    specify

    documentType,

    you

    must

    specify

    QName.

    outputHeaderDocument Document HeaderelementfromtheSOAPmessageintheformofadocument(IData).

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    14/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    ISDEV-DS-712-20080926 14

    Example

    SupposethatmessageContextcontainsaSOAPmessagewiththefollowingheader:

    someValue

    ...

    Additionally,supposethatpub.soap:handler:getHeaderElementusesthefollowinginputvalues,wheremessageContexthasalreadybeenobtained:

    Input Parameter Provided Value

    QName namespaceName userHandlerNamespaceName

    localName userHandlerLocalName

    documentType documentTypes:myHeaderStructure

    ThestructureofdocumentTypes:myHeaderStructurelookslikethis:

    TheprefixesindocumentTypes:myHeaderStructurerefertothefollowingnamespaces.

    Prefix Namespace

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    15/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    ISDEV-DS-712-20080926 15

    Executionofthepub.soap.handler:getHeaderElementserviceresultsinthefollowingvalueforoutputHeaderDocument:

    IntegrationServerusesthefollowingconventionsinoutputHeaderDocument:

    outputHeaderDocumentalwayscontainsadocumentlistnamedHDRDOC1:localName.Thedocumentlistcontainstheheaderretrievedbythepub.soap.handler:getHeaderElementservice.

    IntegrationServer

    uses

    HDRDOC1

    as

    the

    prefix

    for

    the

    header

    element

    (block).

    ThevalueofHDRDOC1isthenamespacenameportionoftheQName.TheoutputHeaderDocument/nsDeclsdocumentidentifiesthenamespaceassociatedwiththenamespaceprefixoftherequestedheaderelement(block).

    TheHDRDOC1:localName[0]documentcontainsannsDeclsdocumentthatidentifiesthenamespaceprefixesusedwithintheretrievedheaderelement.IntegrationServerreplacestheprefixesusedintheSOAPenvelopewiththeprefixesthatthedocumenttypespecifiesforthesamenamespaces.

    IntegrationServerusesthesamegeneralstructurewhenplacingSOAPheadersinthepipelineforISservicesactingasWebservices.Formoreinformation,seeServerConfigurationParametersonpage 24.

    See Also

    pub.soap.handler:addHeaderElement

    pub.soap.handler:removeHeaderElement

    myPrefix pfx1namespace

    myNS1 ns1namespace

    myNS2 ns2namespace

    Input Parameter Provided Value

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    16/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    ISDEV-DS-712-20080926 16

    pub.soap.handler:getProperty

    WmPublic.Getsthevalueofaspecifiedpropertyfromamessagecontext.

    Input Parameters

    Output Parameters

    See Also

    pub.soap.handler:removeProperty

    pub.soap.handler:setProperty

    pub.soap.handler:getSOAPMessageWmPublic.GetstheSOAPmessagefromagivenmessagecontext.

    Input Parameters

    Output Parameters

    messageContext ObjectMessagecontextfromwhichtoretrieveapropertyvalue.

    AmessagecontextcontainspropertiesfortheSOAPmessageandprovidesaccesstotheSOAPmessage.IntegrationServercreatesthemessagecontextandpassesittotheheaderhandler.AllhandlersinvokedbyagiveninstanceofaSOAPrequestorSOAPresponseusethesamemessagecontext,whichenablesyoutousethemessagecontexttopassinformationamonghandlers.Forexample,inachainofrequestheaderhandlers,thefirstrequestheaderhandlercouldsetamessagepropertythatthesecondrequestheaderhandlerretrieves.

    key String Nameoftheselectedpropertywhosevaluetoretrieve.

    value ObjectValueofthespecifiedproperty.

    messageContext Object MessagecontextfromwhichtogettheSOAPmessage.

    AmessagecontextcontainspropertiesfortheSOAPmessageandprovidesaccesstotheSOAPmessage.IntegrationServercreatesthemessagecontextandpassesittotheheaderhandler.AllhandlersinvokedbyagiveninstanceofaSOAPrequestorSOAPresponseusethesamemessagecontext,whichenables

    youto

    use

    the

    message

    context

    to

    pass

    information

    among

    handlers.

    SOAPMessage Object Objectoftypejavax.xml.soap.SOAPMessagethatrepresentstheSOAPmessage.

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    17/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    ISDEV-DS-712-20080926 17

    Usage Notes

    YoucanusetheSOAPmessageretrievedbythisservicewithanyexistingpublicservicethattakesanobjectoftypejavax.xml.soap.SOAPMessageasinput.Forexample,youcanusetheSOAPmessageasinputforthepub.soap.utils:addBodyEntryorpub.soap.utils:addHeaderEntryservices.

    See Also

    pub.soap.handler:setSOAPMessage

    pub.soap.handler:handlerSpec

    WmPublic.Specificationtouseasthesignatureforaservicethatactsasaheaderhandler.

    Input Parameters

    Output Parameters

    messageContext Object Messagecontext

    to

    be

    processed

    by

    the

    header

    handler.

    AmessagecontextcontainspropertiesfortheSOAPmessageandprovidesaccesstotheSOAPmessage.IntegrationServercreatesthemessagecontextandpassesittotheheaderhandler.AllhandlersinvokedbyagiveninstanceofaSOAPrequestorSOAPresponseusethesamemessagecontext,whichenablesyoutousethemessagecontexttopassinformationamonghandlers.

    statusCode String Indicateswhethertheheaderhandlerserviceexecutedsuccessfullyornot.ThestatusCodeparametermusthaveoneofthefollowingvalues:

    Value Description

    0 Indicatesthehandlerserviceexecutedsuccessfully.

    1 Indicatesthehandlerserviceendedinfailureandnoexceptionwillbethrown.

    2 Indicatesthatthehandlerserviceendedinfailureandthrewtheexceptionjavax.xml.rpc.JAXRPCException.

    3 Indicatesthatthehandlerserviceendedinfailureandthrewtheexceptionjavax.xml.rpc.soap.SOAPFault.

    faultMessage StringConditional.Textofthefaultmessagesentifanexceptionoccurredduringhandlerexecution.ThefaultMessageoutputparameterisproducedwhenstatusCodeis2or3.

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    18/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    ISDEV-DS-712-20080926 18

    Usage Notes

    Servicesthatactasheaderhandlersdonotneedtousethisspecificationtodefinethesignatureoftheservice.However,servicesthatactasheaderhandlersmusttaketheinputparametersandproducetheoutputparametersidentifiedinthisspecification.

    IfstatusCode

    does

    not

    contain

    one

    of

    the

    specified

    values,

    Integration

    Server

    assumes

    avalueof0.

    Atruntime,ifstatusCodeissettoavalueof2or3,IntegrationServerinvokestheserviceyouspecifiedforhandlingfaults(handleFaultService)whenyouregisteredasetofservicesasaconsumerorproviderheaderhandler.Forinformationaboutregisteringaconsumerheaderhandler,seepub.soap.handler:registerWmConsumeronpage 18.Forinformationaboutregisteringaproviderheaderhandler,seepub.soap.handler:registerWmProvideronpage 19.

    pub.soap.handler:registerWmConsumer

    WmPublic.RegistersaheaderhandlerforusewithconsumerWebservicedescriptors.

    Input Parameters

    Output Parameters

    None.

    Usage Notes

    Beforeyouregisteraconsumerheaderhandler,createtheservicesthatwillactastherequest,response,andfaultheaderhandlers.

    IntegrationServerstoresinformationaboutregisteredheaderhandlersinmemory.IntegrationServerdoesnotpersistregisteredheaderhandlerinformationacrossrestarts.Consequently,youmustregisterheaderhandlerseachtimeIntegrationServerstarts.Toaccomplishthis,createaservicethatregistersaheaderhandlerandmakethatserviceastartupserviceforthepackagethatcontainstheservicesthatactasheaderhandlers.

    descriptiveName String Nametoassigntotheconsumerheaderhandler.Eachconsumerheaderhandlermusthaveauniquename.

    QNameList Document ListQualifiednamesoftheheadersonwhichthehandleroperates.Inthedocumentlist,eachdocumentreferencesthepub.soap.utils:QNamedocumenttype.

    handleRequestService StringOptional.Fullyqualifiednameoftheservicetouseas

    therequest

    header

    handler.

    handleResponseService StringOptional.Fullyqualifiednameoftheservicetouseastheresponseheaderhandler.

    handleFaultService StringOptional.Fullyqualifiednameoftheservicetouseasthefaultheaderhandler.

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    19/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    ISDEV-DS-712-20080926 19

    YoucanuseaconsumerheaderhandlerwithconsumerWebservicedescriptorsonly.

    Usethepub.soap.handler:registerWmProviderservicetoregisteraheaderhandlerforusewithproviderWebservicedescriptors.

    Tounregisteraconsumerheaderhandler,usethepub.soap.handler:unregisterConsumer

    service.For

    more

    information

    about

    this

    service,

    see

    the

    webMethods

    Integration

    Server

    BuiltInServicesReference.

    IfyouspecifyaservicethatdoesnotexistforhandleRequest,handleResponse,orhandleFaultService,IntegrationServerthrowsthiserror:

    [ISS.0088.9421] The Service serviceName does not exist or invalid

    IfaregisteredhandlerwiththesamedescriptiveNamealreadyexists,IntegrationServerthrowsthiserror.

    ISS.0088.9156 JAX Handler already registered

    See Also

    pub.soap.handler:registerWmProvider

    pub.soap.handler:registerWmProvider

    WmPublic.RegistersaheaderhandlerforusewithproviderWebservicedescriptors.

    Input Parameters

    Output Parameters

    None.

    Usage Notes

    Beforeyouregisteraproviderheaderhandler,createtheservicesthatwillactastherequest,response,andfaultheaderhandlers.

    descriptiveName String Nametoassigntotheproviderheaderhandler.Eachproviderheaderhandlermusthaveauniquename.

    QNameListDocument List

    Qualified

    names

    of

    the

    headers

    on

    which

    the

    handleroperates.Inthedocumentlist,eachdocumentreferencesthepub.soap.utils:QNamedocumenttype.

    handleRequestService StringOptional.Fullyqualifiednameoftheservicetouseastherequestheaderhandler.

    handleResponseService StringOptional.Fullyqualifiednameoftheservicetouseastheresponseheaderhandler.

    handleFaultService StringOptional.Fullyqualifiednameoftheservicetouseasthefaultheaderhandler.

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    20/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    ISDEV-DS-712-20080926 20

    IntegrationServerstoresinformationaboutregisteredheaderhandlersinmemory.IntegrationServerdoesnotpersistregisteredheaderhandlerinformationacrossrestarts.Consequently,youneedtoregisterheaderhandlerseachtimeIntegrationServerstarts.Toaccomplishthis,createaservicethatregistersaheaderhandlerandmakethatserviceastartupserviceforthepackagethatcontainstheservicesthatact

    asheader

    handlers.

    YoucanuseaproviderheaderhandlerwithproviderWebservicedescriptorsonly.

    Usethepub.soap.handler:registerWmConsumerservicetoregisteraheaderhandlerforusewithconsumerWebservicedescriptors.

    Tounregisteraproviderheaderhandler,usethepub.soap.handler:unregisterProviderservice.Formoreinformationaboutthisservice,seethewebMethodsIntegrationServerBuiltInServicesReference.

    IfyouspecifyaservicethatdoesnotexistforhandleRequest,handleResponse,orhandleFaultService,IntegrationServerthrowsthiserror:

    [ISS.0088.9421] The Service does not exist or invalid

    IfaregisteredhandlerwiththesamedescriptiveNamealreadyexists,IntegrationServerthrowsthiserror.

    [ISS.0088.9156] JAX Handler already registered

    See Also

    pub.soap.handler:registerWmConsumer

    pub.soap.handler:removeHeaderElement

    WmPublic.Removesaheaderelement(block)fromaSOAPmessage.

    Input Parameters

    messageContext Object MessagecontextthatcontainstheSOAPmessagefromwhichtoremoveaheaderelement(block).

    AmessagecontextcontainspropertiesfortheSOAPmessageaswellasprovidingaccesstotheSOAPmessage.IntegrationServercreatesthemessagecontextandpassesittotheheaderhandler.AllhandlersinvokedbyagiveninstanceofaSOAPrequestorSOAPresponseusethesamemessagecontext.Thisenablesyoutousethemessagecontexttopassinformationbetweenhandlers.

    QName ObjectQualifiednameoftheheaderelement(block)toremove.TheQNamedocumentreferencesthepub.soap.utils:QNamedocumenttype.Formoreinformationaboutpub.soap.utils:QName,seethewebMethodsIntegrationServerBuiltInServicesReference.

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    21/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    ISDEV-DS-712-20080926 21

    Output Parameters

    See Also

    pub.soap.handler:addHeaderElement

    pub.soap.handler:getHeaderElement

    pub.soap.handler:removeProperty

    WmPublic.Removesapropertyfromamessagecontext.

    Input Parameters

    Output Parameters

    None.

    See Also

    pub.soap.handler:getProperty

    pub.soap.handler:setProperty

    status String IndicateswhetherIntegrationServersuccessfullyremovedtheheaderelement.

    Key Description

    True IndicatesthatIntegrationServerremovedtheheaderelement.

    False IndicatesthatIntegrationServerdidnotremovetheheaderelementbecausetheSOAPmessagedidnotcontainaheaderelementthatmatchedtheprovidedQName.

    messageContext ObjectMessagecontextfromwhichtoremoveaproperty.

    AmessagecontextcontainspropertiesfortheSOAPmessageandprovidesaccesstotheSOAPmessage.IntegrationServercreatesthe

    messagecontextandpassesittotheheaderhandler.AllhandlersinvokedbyagiveninstanceofaSOAPrequestorSOAPresponseusethesamemessagecontext,whichenablesyoutousethemessagecontexttopassinformationamonghandlers.Forexample,inachainofrequestheaderhandlers,thefirstrequestheaderhandlercouldsetamessagepropertythatthesecondrequestheaderhandlerretrieves.

    key String Nameofthepropertytoremove.

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    22/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    ISDEV-DS-712-20080926 22

    pub.soap.handler:setProperty

    WmPublic.Setsthevalueofaspecificpropertyinamessagecontext.

    Input Parameters

    Output Parameters

    None.

    See Also

    pub.soap.handler:getProperty

    pub.soap.handler:removeProperty

    pub.soap.handler:setSOAPMessage

    WmPublic.SetstheSOAPmessageinamessagecontext.

    Input Parameters

    messageContext Object Messagecontextinwhichtosetaproperty.

    AmessagecontextcontainspropertiesfortheSOAPmessageandprovidesaccesstotheSOAPmessage.IntegrationServercreatesthemessagecontextandpassesittotheheaderhandler.AllhandlersinvokedbyagiveninstanceofaSOAPrequestorSOAPresponseusethesamemessagecontext,whichenablesyoutousethemessagecontexttopassinformationamonghandlers.Forexample,inachainofrequestheaderhandlers,thefirstrequestheaderhandlercouldsetamessagepropertythatthesecondrequestheaderhandlerretrieves.

    key String Nameofthepropertytoset.

    value ObjectValuetoassigntothespecifiedproperty.

    messageContext Object MessagecontextinwhichtosettheSOAPmessage.

    AmessagecontextcontainspropertiesfortheSOAPmessageandprovidesaccesstotheSOAPmessage.IntegrationServercreatesthemessagecontextandpassesittotheheaderhandler.AllhandlersinvokedbyagiveninstanceofaSOAPrequestor

    SOAPresponse

    use

    the

    same

    message

    context,

    which

    enables

    youtousethemessagecontexttopassinformationamonghandlers.

    SOAPMessage Object Objectoftypejavax.xml.soap.SOAPMessagetousetooverwritetheexistingSOAPmessageinthemessagecontext.

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    23/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    ISDEV-DS-712-20080926 23

    Output Parameters

    None.

    Usage Notes

    Usethis

    service

    with

    caution,

    as

    itoverwrites

    the

    entire

    SOAP

    message,

    including

    the

    SOAPheader,body,andfault.

    See Also

    pub.soap.handler:getSOAPMessage

    pub.universalName:findDocumentType

    WmPublic.Returnsthefullyqualifieddocumenttypenameforaprovidedexplicituniversalname.

    Input Parameters

    Output Parameters

    pub.universalName:listAll

    WmPublic.Returnsthecontentsofthecurrentuniversalnameregistry,includingservicesanddocumenttypes.

    Input Parameters

    None.

    namespaceName StringNamespaceportionoftheuniversalname.

    localName StringLocalnameportionoftheuniversalname.

    svcName StringConditional.FullyqualifiednameofthedocumenttypeassociatedwiththeuniversalnameinnamespaceNameandlocalName.Ifthespecifieduniversalnameisnotintheregistry,

    svcName

    will

    be

    null.

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    24/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    ISDEV-DS-712-20080926 24

    Output Parameters

    Usage Notes

    Toreturnalistoftheservicesintheuniversalnameregistryonly,usethepub.universalName:list service.

    Server Configuration Parameters

    webMethodsIntegrationServer7.1.2includesthefollowingnewserverparameters.

    watt.server.acl.groupScanInterval

    Specifies,inmilliseconds,howfrequentlyIntegrationServerchecksfortheMy

    webMethodsServer

    user

    database

    and

    attempts

    to

    load

    central

    user

    management

    groups

    assignedtoanACL.Thedefaultis10,000milliseconds.

    watt.server.jdbc.derby.commitTolerance

    Specifies,inmilliseconds,howlongtheDerbysoftwarewillwaitforacommittoprocess.Thedefaultis150milliseconds.

    names Document ListEntriesintheuniversalnameregistry.Eachdocument(IDataobject)inthelistrepresentsanentryintheuniversalnameregistry.

    Thereisoneentryforeveryexplicituniversalnamethathasbeendefinedontheserver.Implicituniversalnamesarenotmaintainedintheregistry.

    Eachdocumentinthelistcontainsthefollowinginformation:

    Key Description

    universalName DocumentUniversalnameassociatedwiththeentry.Thisdocumentcontainsthefollowinginformation:

    Key Description

    namespaceName StringNamespace

    portion

    of

    the

    universalname.

    localName StringLocalportionoftheuniversalname.

    svcName StringFullyqualifiedwebMethodsservicenameordocumenttypenameassociatedwiththeentry(forexample,gl.post:postEntry).

    Note: TheinformationinthissectionsupplementsthecontentsofAppendixB:ServerConfigurationParametersinthewebMethods Integration Server Administrators Guide .

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    25/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    ISDEV-DS-712-20080926 25

    watt.server.soap.validateResponse

    EnablesordisablesSOAPresponsevalidation.Whensettotrue,IntegrationServervalidatestheSOAPresponsereceivedbyaWebserviceconnector.Whensettofalse,IntegrationServerdoesnotvalidatethereceivedSOAPresponse.Thedefaultistrue.

    watt.server.SoapRPC.useSecondaryType

    InstructsIntegrationServertouseasecondtypedefinitionwhencreatingtheSOAPresponseforaservicewhoseinputoroutputsignaturescontainidenticallynamedvariablesofdifferenttypes.WhencreatingaWSDLfromaproviderWebServiceDescriptorthatcontainsaservicewithidenticallynamedfieldsofdifferenttypes,IntegrationServerrenamesthesecondinstanceofthefieldtypeintheWSDL.Atruntime,forRPCEncodedSOAPbinding,IntegrationServerencodesthetypesintheSOAPresponse.Whenthispropertyissettotrue,theSOAPresponsereferstotherenamedtypedefinition.Whensettofalse,theSOAPresponsereferstotheoriginaltypedefinitioninsteadoftherenamedone.Thedefaultisfalse.ThispropertyisapplicabletoRPCEncodedSOAPbindingonly.

    watt.server.trigger.suspendOnAuditErrorWhen

    SpecifieswhenIntegrationSevershouldsuspendatrigger.Atriggercanbesuspendedwhenboththefollowingoccur:

    Thetriggerservicefails.

    Thetriggerservicecannotwriteauditdatatotheauditdatabasebecauseanauditexceptionoccurs.

    WhenIntegrationServersuspendsatrigger,ithaltsdocumentprocessinganddocumentretrievalforthetrigger.SuspendingthetriggerpreventsIntegrationServerfromacknowledgingthedocumentandpreventstheBrokerfromdiscardingthedocument.Aftersuspendingthetrigger,IntegrationServermonitorstheconnectiontotheauditdatabaseandresumesthetrigger(documentprocessinganddocumentretrieval)when

    theconnectiontotheauditdatabaseisreestablished.IntegrationServerretrievestheunacknowledgeddocumentfromtheBrokerandattemptstoprocessitagain.

    Setthewatt.server.trigger.suspendOnAuditErrorWhenparametertooneofthefollowingvalues:

    Specify... To...

    Never IndicatethatIntegrationServerdoesnotsuspendatriggerifthetriggerserviceendsbecauseofanerrorandanauditexceptionoccurswhenthetriggerserviceattemptstowritedatatotheauditdatabase.

  • 7/30/2019 7-1-2 Integration Server and Developer Documentation Supplement

    26/26

    webMethods Integration Server and webMethods Developer Version 7.1.2

    IntegrationServermustberestartedforanychangestothisparametertotakeeffect.

    Thewatt.server.trigger.suspendOnAuditErrorWhenconfigurationparameteronlyapplieswhentheauditsubsystemisconfiguredtowritedatasynchronously(watt.server.auditSync=true).

    Error IndicatethatIntegrationServersuspendsatriggerifthetriggerserviceendsbecauseofanerrorandanauditexceptionoccurswhenthetriggerserviceattemptstowrite

    datatotheauditdatabase.ErrorPipelineEnabled IndicatethatIntegrationServersuspendsatriggerifthe

    triggerserviceendsbecauseofanerror,thetriggerserviceisconfiguredtoincludetheservicepipelineintheauditlog,andanauditexceptionoccurswhenthetriggerserviceattemptstowritedatatotheauditdatabase.ThedefaultisErrorPipelineEnabled.

    Specify... To...