Привет всем, у меня есть проблемы при использовании apache приложений,
Я подключился к прокси-серверу в apache, используя этот код
<property expression="json-eval($.TransCode)" name="TransCode" scope="default" type="STRING"/>
<property expression="json-eval($.MsgType)" name="MsgType" scope="default" type="STRING"/>
<property expression="json-eval($.symbol)" name="symbol" scope="default" type="STRING"/>
<property expression="json-eval($.side)" name="side" scope="default" type="STRING"/>
<property expression="json-eval($.orderQty)" name="orderQty" scope="default" type="STRING"/>
<property expression="json-eval($.TimeInForce)" name="TimeInForce" scope="default" type="STRING"/>
<property expression="json-eval($.OrdType)" name="OrdType" scope="default" type="STRING"/>
<payloadFactory media-type="xml">
<format>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<message>
<header>
<field id="35">$1</field>
</header>
<body>
<field id="11">$2</field>
<field id="55">$3</field>
<field id="54">$4</field>
<field id="38">$5</field>
<field id="40">$6</field>
<field id="59">$7</field>
</body>
<trailer/>
</message>
</soapenv:Body>
</soapenv:Envelope>
</soapenv:Body>
</soapenv:Envelope>
</format>
<args>
<arg evaluator="xml" expression="$ctx:MsgType" xmlns:ns="http://org.apache.synapse/xsd"/>
<arg evaluator="xml" expression="$ctx:TransCode" xmlns:ns="http://org.apache.synapse/xsd"/>
<arg evaluator="xml" expression="$ctx:symbol" xmlns:ns="http://org.apache.synapse/xsd"/>
<arg evaluator="xml" expression="$ctx:side" xmlns:ns="http://org.apache.synapse/xsd"/>
<arg evaluator="xml" expression="$ctx:orderQty" xmlns:ns="http://org.apache.synapse/xsd"/>
<arg evaluator="xml" expression="$ctx:OrdType" xmlns:ns="http://org.apache.synapse/xsd"/>
<arg evaluator="xml" expression="$ctx:TimeInForce" xmlns:ns="http://org.apache.synapse/xsd"/>
</args>
</payloadFactory>
<log level="full"/>
<header name="Accept" scope="transport" value="*/*"/>
<header name="Content-Type" scope="transport" value="text/xml"/>
<header name="soapaction" scope="transport" value="urn:mediate"/>
<property name="messageType" scope="axis2" type="STRING" value="text/xml"/>
<property name="DISABLE_CHUNKING" scope="axis2" type="STRING" value="true"/>
<call>
<endpoint name="ProxyFIX">
<http method="post" uri-template="http://IP/services/FixFastMatchTransaction">
<timeout>
<duration>15000</duration>
<responseAction>fault</responseAction>
</timeout>
<suspendOnFailure>
<errorCodes>-1</errorCodes>
<initialDuration>0</initialDuration>
<progressionFactor>1.0</progressionFactor>
<maximumDuration>0</maximumDuration>
</suspendOnFailure>
<markForSuspension>
<errorCodes>-1</errorCodes>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
</markForSuspension>
</http>
</endpoint>
</call>
этот код в порядке и может нажмите мой прокси.
здесь мой код прокси
<proxy name="FixFastMatchTransaction" startOnLoad="true" transports="http https" xmlns="http://ws.apache.org/ns/synapse">
<target>
<endpoint>
<address uri="fix://IPBroker?BeginString=FIX.4.2&SenderCompID=mycomp&TargetCompID=targetcomp&SSLTunnel=NO">
<suspendOnFailure>
<initialDuration>-1</initialDuration>
<progressionFactor>1</progressionFactor>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
</markForSuspension>
</address>
</endpoint>
<inSequence>
<property name="transport.fix.ServiceName" scope="axis2-client" type="STRING" value="FixFastMatchTransaction"/>
<log level="full"/>
<property expression="$body//message/header/field[1]" name="typeTransaction" scope="default" type="STRING" xmlns:ns="http://org.apache.synapse/xsd"/>
</inSequence>
<outSequence>
<property expression="$body" name="isiResponse" scope="default" type="STRING"/>
<log>
<property expression="$ctx:typeTransaction" name="new order single"/>
</log>
<log level="full"/>
<sequence key="makeresponseTransaction"/>
<send/>
</outSequence>
<faultSequence/>
</target>
<parameter name="transport.fix.InitiatorConfigURL">file:/home/ec2-user/fastmatch_server_new/FIXTransaction.cfg</parameter>
<parameter name="transport.fix.SendAllToInSequence">false</parameter>
<parameter name="transport.fix.DropExtraResponses">true</parameter>
<parameter name="transport.fix.InitiatorMessageStore">file</parameter>
</proxy>
и здесь журнал, когда я попал на мой прокси
LogMediator To: /services/FixFastMatchTransaction, WSAction: urn:mediate, SOAPAction: urn:mediate,
MessageID: urn:uuid:8f1a8a8b-48cb-46c7-ba8a-01245dc68eca, Direction: request, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelo
pe xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><message xmlns="http://ws.apache.org/ns/synapse"><header><field id=
"35">D</field></header><body><field id="11">VTR_230</field><field id="55">EUR/USD</field><field id="54">1</field><field id="38">100000</field>
<field id="40">1</field><field id="59">1</field></body><trailer/></message></soapenv:Body></soapenv:Envelope>
и здесь журнал ошибок при обращении брокера с помощью прокси-сервисы
ERROR - Axis2Sender Unexpected error during sending message out
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:542)
at java.lang.Integer.parseInt(Integer.java:615)
at org.apache.synapse.transport.fix.FIXUtils.createFIXMessage(FIXUtils.java:377)
at org.apache.synapse.transport.fix.FIXTransportSender.sendMessage(FIXTransportSender.java:109)
at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:185)
at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:167)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:603)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:85)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:547)
at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:384)
at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:65)
at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:245)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:415)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
мой вопрос, как решить мою проблему?
С наилучшими пожеланиями,
Fuad