AMcoder - javascript, python, java, html, php, sql

Հարցումների քանակը cxf ծառայությունում

Ես օգտագործում եմ mule CE 3.3.0: Իմ նախագիծն ունի հետևյալը.

<mule xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting"
xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:mule-ss="http://www.mulesoft.org/schema/mule/spring-security"
xmlns:ss="http://www.springframework.org/schema/security"
xmlns:spring="http://www.springframework.org/schema/beans" version="CE-3.3.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd 
http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd 
http://www.mulesoft.org/schema/mule/spring-security http://www.mulesoft.org/schema/mule/spring-security/3.3/mule-spring-security.xsd 
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd 
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd 
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd 
http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule-scripting.xsd ">

<global-property name="allowed" value="192.168.3.76,192.168.3.74,192.168.3.75" />

<configuration>
    <expression-language>
        <global-functions>
            def parseIp(fullIp) {
            return fullIp.substring(fullIp.indexOf('/') + 1, fullIp.indexOf(':'))
            }
    </global-functions>
    </expression-language>
</configuration>

<http:connector name="httpConnector" doc:name="HTTP\HTTPS">
    <service-overrides sessionHandler="org.mule.session.NullSessionHandler" />
</http:connector>

<mule-ss:security-manager>
    <mule-ss:delegate-security-provider
        name="memory-dao" delegate-ref="authenticationManager" />
</mule-ss:security-manager>
<spring:beans>
    <ss:authentication-manager
        xmlns:ss="http://www.springframework.org/schema/security" alias="authenticationManager">
        <ss:authentication-provider>
            <ss:user-service id="userService">
                <ss:user name="weather" password="weather" authorities="ROLE_ADMIN" />
            </ss:user-service>
        </ss:authentication-provider>
    </ss:authentication-manager>
</spring:beans>

<flow name="OML_News" doc:name="OML_News">
    <http:inbound-endpoint host="localhost" port="9091"
        path="iran/oml_news" exchange-pattern="request-response" doc:name="HTTP">
    <mule-ss:http-security-filter realm="mule-realm" />
    </http:inbound-endpoint>
    <expression-filter
        expression="#['${allowed}'.contains(parseIp(message.inboundProperties['MULE_REMOTE_CLIENT_ADDRESS']))]"
        doc:name="Expression" />        

    <cxf:proxy-service 
        service="Weather"
        wsdlLocation="http://wsf.cdyne.com/WeatherWS/Weather.asmx?wsdl"
        namespace="http://ws.cdyne.com/WeatherWS/"
        validationEnabled="true" doc:name="SOAP">
    </cxf:proxy-service>

    <copy-properties propertyName="SOAPAction" doc:name="Property" />

    <cxf:proxy-client doc:name="SOAP" />

    <outbound-endpoint 
        address="http://wsf.cdyne.com/WeatherWS/Weather.asmx"
        exchange-pattern="request-response" doc:name="Generic">
    </outbound-endpoint>

</flow>

I launch a cxf service. There are some customers who use wsdl address in my cxf service and they implemented web services. Now I want that will be possible to determine how many users are using my wsdl address and each of them how many requests do send to my server? In fact, I want create a report system.

03.03.2013

Պատասխանները:


1

Դա անելու մի քանի եղանակ կա, օրինակ՝ կարող եք ավելացնել գաղտնալսում ձեր http մուտքային վերջնակետից հետո և կանչել կա՛մ հատուկ բաղադրիչ, որը վիճակագրություն է հավաքում տվյալների բազայում, կա՛մ ավելի էլեգանտ կերպով զանգահարել հոսք, որն անում է դա:

<http:inbound-endpoint address="http://yourendpointaddress:8080/path" />
<wire-tap>
    <vm:outbound-endpoint path="stats" />
</wire-tap>

Եւ հետո

<flow name="statsFlow">
    <vm:inbound-endpoint path="stats" />
    <!-- gather stats from the headers -->
    <jdbc:outbound-endpoint queryKey="insertStatsIntoDB" />
</flow>

Սա պետք է հավաքի վիճակագրություն՝ չազդելով կատարողականի վրա:

03.03.2013
  • Շնորհակալություն @Juan, երբ ես ուղղակիորեն օգտագործում եմ իմ wsdl հասցեն, այս լուծումը ճիշտ է աշխատում, բայց երբ ես ստեղծում եմ պորտլետ wsdl-ով որպես վեբ ծառայություն և տեղադրում եմ այն ​​իմ պորտալում, այս լուծումը չի աշխատում, և իմ վիճակագրությունը սխալ է: քանի որ ես ուզում եմ ունենալ իմ պորտլետի հարցումների ճշգրիտ վիճակագրություն, որն օգտագործում է իմ WSDL-ը, որը ես այն կարգավորել եմ MULE-ում 04.03.2013
  • Նոր նյութեր

    Օգտագործելով Fetch Vs Axios.Js-ը՝ HTTP հարցումներ կատարելու համար
    JavaScript-ը կարող է ցանցային հարցումներ ուղարկել սերվեր և բեռնել նոր տեղեկատվություն, երբ դա անհրաժեշտ լինի: Օրինակ, մենք կարող ենք օգտագործել ցանցային հարցումը պատվեր ներկայացնելու,..

    Տիրապետել հանգստության արվեստին. մշակողի ուղեցույց՝ ճնշման տակ ծաղկելու համար
    Տիրապետել հանգստության արվեստին. մշակողի ուղեցույց՝ ճնշման տակ ծաղկելու համար Ինչպե՞ս հանգստացնել ձեր միտքը և աշխատեցնել ձեր պրոցեսորը: Ինչպես մնալ հանգիստ և զարգանալ ճնշման տակ...

    Մեքենայի ուսուցում բանկային և ֆինանսների ոլորտում
    Բարդ, խելացի անվտանգության համակարգերը և հաճախորդների սպասարկման պարզեցված ծառայությունները բիզնեսի հաջողության բանալին են: Ֆինանսական հաստատությունները, մասնավորապես, պետք է առաջ մնան կորի..

    Ես AI-ին հարցրի կյանքի իմաստը, այն ինչ ասում էր, ցնցող էր:
    Այն պահից ի վեր, երբ ես իմացա Արհեստական ​​ինտելեկտի մասին, ես հիացած էի այն բանով, թե ինչպես է այն կարողանում հասկանալ մարդկային նորմալ տեքստը, և այն կարող է առաջացնել իր սեփական արձագանքը դրա..

    Ինչպես սովորել կոդավորումը Python-ում վագրի պես:
    Սովորելու համար ծրագրավորման նոր լեզու ընտրելը բարդ է: Անկախ նրանից, թե դուք սկսնակ եք, թե առաջադեմ, դա օգնում է իմանալ, թե ինչ թեմաներ պետք է սովորել: Ծրագրավորման լեզվի հիմունքները, դրա..

    C++-ի օրական բիթ(ե) | Ամենաերկար պալինդրոմային ենթաշարը
    C++ #198-ի ամենօրյա բիթ(ե), Ընդհանուր հարցազրույցի խնդիր. Ամենաերկար պալինդրոմային ենթատող: Այսօր մենք կանդրադառնանք հարցազրույցի ընդհանուր խնդրին. Ամենաերկար palindromic substring...

    Kydavra ICAReducer՝ ձեր տվյալների ծավալայինությունը նվազեցնելու համար
    Ի՞նչ է ICAReducer-ը: ICAReducer-ն աշխատում է հետևյալ կերպ. այն նվազեցնում է նրանց միջև բարձր փոխկապակցված հատկանիշները մինչև մեկ սյունակ: Բավականին նման է PCAreducer-ին, չնայած այն..