あるサービスから別のサービスに wsa アドレス指定の「From」SOAP ヘッダーを渡そうとしましたが、渡すことができません。次のシナリオがあります
別の WSO2 データ サービスを呼び出すプロキシ サービスがあります。プロキシ サービスがデータ サービスから障害を受け取った場合、その障害メッセージを、プロキシ サービスでもある一般的なエラー ハンドラに転送します。
メッセージをエラー ハンドラ プロキシ サービスに転送する前のプロキシ サービスで、以下のようにヘッダー メディエーターを使用して、呼び出し元のプロキシ サービスにヘッダーを設定します。
<header name="Action" value="urn:mediate" />
<header name="From" value="http://localhost:8280/services/TQS_SFA_CUST_SRCH" />
<header name="To" value="http://localhost:8280/services/TQS_ERROR_HANDLER" />
ただし、エラー ハンドラ プロキシ サービスは「From」ヘッダーを受信せず、少なくともログやトレースには表示されません。
これは一般的なエラー ハンドラーであるため、呼び出し元のサービスごとにエラーを処理できるように、呼び出し元のサービスを知る必要があります。
エラー ハンドラーで "From" ヘッダーを確認できるように、SOAP アドレス指定ヘッダーを設定するにはどうすればよいですか? エンドポイントメディエーターと、メッセージをエラーハンドラーに送信するプロパティのメッセージレベル設定も試しました。また、エンドポイント定義で WS アドレッシングを有効にしました。何も機能していないようです。
参照用に添付されたトレース ログを次に示します。
16:05:55,451 [-] [HttpClientWorker-14] INFO TRACE_LOGGER Start : Property mediator
16:05:55,452 [-] [HttpClientWorker-14] INFO TRACE_LOGGER Setting property : FromWhichService at scope : transport to : TQS_SFA_CUST_SRCH (i.e. constant : TQS_SFA_CUST_SRCH)
16:05:55,452 [-] [HttpClientWorker-14] INFO TRACE_LOGGER End : Property mediator
16:05:55,452 [-] [HttpClientWorker-14] INFO TRACE_LOGGER Start : Header mediator
16:05:55,452 [-] [HttpClientWorker-14] INFO TRACE_LOGGER Set SOAP header : Action to : urn:mediate
16:05:55,453 [-] [HttpClientWorker-14] INFO TRACE_LOGGER End : Header mediator
16:05:55,453 [-] [HttpClientWorker-14] INFO TRACE_LOGGER Start : Header mediator
16:05:55,453 [-] [HttpClientWorker-14] INFO TRACE_LOGGER Set SOAP header : From to : /services/TQS_SFA_CUST_SRCH
16:05:55,453 [-] [HttpClientWorker-14] INFO TRACE_LOGGER End : Header mediator
16:05:55,453 [-] [HttpClientWorker-14] INFO TRACE_LOGGER Start : Header mediator
16:05:55,453 [-] [HttpClientWorker-14] INFO TRACE_LOGGER Set SOAP header : To to : http://localhost:8280/services/TQS_ERROR_HANDLER
16:05:55,454 [-] [HttpClientWorker-14] INFO TRACE_LOGGER End : Header mediator
16:05:55,454 [-] [HttpClientWorker-14] INFO TRACE_LOGGER Start : Log mediator
16:05:55,455 [-] [HttpClientWorker-14] INFO TRACE_LOGGER To: http://localhost:8280/services/TQS_ERROR_HANDLER, From: /services/TQS_SFA_CUST_SRCH, WSAction: urn:mediate, SOAPAction: urn:mediate, MessageID: urn:uuid:0ccdd39d-e96b-491b-ba53-2411b84fa950, Direction: response, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><axis2ns233:DataServiceFault xmlns:axis2ns233="http://ws.wso2.org/dataservice">Error obtaining parser from data source:DS Fault Message: Error in 'SQLQuery.processNormalQuery'
DS Code: DATABASE_ERROR
Source Data Service:-
Name: CUST_SRCH_D_DS
Location: /CUST_SRCH_D_DS-1.0.0.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: CUST_SRCH_OP
Current Params: {DSID={100008492,10001565,100016993,100097721}}
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
com.teradata.jdbc.jdbc_4.util.JDBCException: [Teradata Database] [TeraJDBC 14.00.00.13] [Error 3810] [SQLState 42S22] Column/Parameter 'gca.a.peson_id' does not exist.
</axis2ns233:DataServiceFault></soapenv:Body></soapenv:Envelope>
16:05:55,455 [-] [HttpClientWorker-14] INFO TRACE_LOGGER End : Log mediator
16:05:55,455 [-] [HttpClientWorker-14] INFO TRACE_LOGGER Start : Send mediator
16:05:55,455 [-] [HttpClientWorker-14] INFO TRACE_LOGGER Receiving sequence is set to: Value {name ='null', keyValue ='conf:/tqs/common/ErrorRedirect_Seq.xml'}
16:05:55,455 [-] [HttpClientWorker-14] INFO TRACE_LOGGER Sending response message using implicit message properties..
Sending To: http://localhost:8280/services/TQS_ERROR_HANDLER
SOAPAction: urn:mediate
16:05:55,457 [-] [HttpClientWorker-14] INFO TRACE_LOGGER End : Send mediator
16:05:55,457 [-] [HttpClientWorker-14] INFO TRACE_LOGGER End : Filter mediator
16:05:55,458 [-] [HttpClientWorker-14] INFO TRACE_LOGGER Start : Log mediator
16:05:55,458 [-] [HttpClientWorker-14] INFO TRACE_LOGGER To: http://localhost:8280/services/TQS_ERROR_HANDLER,From: /services/TQS_SFA_CUST_SRCH,WSAction: urn:mediate,SOAPAction: urn:mediate,MessageID: urn:uuid:f71c97ef-1f32-43a4-9973-c68df81115db,Direction: response,OutSequence-ExitMessage = TQS_SFA_CUST_SRCH - Exiting OutSequence.,Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><axis2ns233:DataServiceFault xmlns:axis2ns233="http://ws.wso2.org/dataservice">Error obtaining parser from data source:DS Fault Message: Error in 'SQLQuery.processNormalQuery'
DS Code: DATABASE_ERROR
Source Data Service:-
Name: CUST_SRCH_D_DS
Location: /CUST_SRCH_D_DS-1.0.0.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: CUST_SRCH_OP
Current Params: {DSID={100008492,10001565,100016993,100097721}}
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
com.teradata.jdbc.jdbc_4.util.JDBCException: [Teradata Database] [TeraJDBC 14.00.00.13] [Error 3810] [SQLState 42S22] Column/Parameter 'gca.a.peson_id' does not exist.
</axis2ns233:DataServiceFault></soapenv:Body></soapenv:Envelope>
16:05:55,459 [-] [HttpClientWorker-14] INFO TRACE_LOGGER End : Log mediator
16:05:55,459 [-] [HttpServerWorker-13] INFO TRACE_LOGGER Proxy Service TQS_ERROR_HANDLER received a new message from : 127.0.0.1
16:05:55,460 [-] [HttpClientWorker-14] INFO TRACE_LOGGER End : Sequence <anonymous>
16:05:55,461 [-] [HttpServerWorker-13] INFO TRACE_LOGGER Message To: /services/TQS_ERROR_HANDLER
16:05:55,461 [-] [HttpServerWorker-13] INFO TRACE_LOGGER SOAPAction: null
16:05:55,462 [-] [HttpServerWorker-13] INFO TRACE_LOGGER WSA-Action: null
16:05:55,462 [-] [HttpServerWorker-13] INFO TRACE_LOGGER Using the anonymous in-sequence of the proxy service for mediation
16:05:55,463 [-] [HttpServerWorker-13] INFO TRACE_LOGGER Start : Sequence <anonymous>
16:05:55,463 [-] [HttpServerWorker-13] INFO TRACE_LOGGER Setting the onError handler : conf:/tqs/common/FaultHandler_Seq.xml for the sequence : null
16:05:55,463 [-] [HttpServerWorker-13] INFO TRACE_LOGGER Sequence <SequenceMediator> :: mediate()
16:05:55,463 [-] [HttpServerWorker-13] INFO TRACE_LOGGER Start : Log mediator
16:05:55,464 [-] [HttpServerWorker-13] ERROR TRACE_LOGGER To: /services/TQS_ERROR_HANDLER,MessageID: urn:uuid:2893d313-b936-4b43-a551-538b26f7cb72,Direction: request,InSequence-EntryMessage = TQS_ERROR_HANDLER - Entering InSequence.,Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><axis2ns233:DataServiceFault xmlns:axis2ns233="http://ws.wso2.org/dataservice">Error obtaining parser from data source:DS Fault Message: Error in 'SQLQuery.processNormalQuery'
DS Code: DATABASE_ERROR
Source Data Service:-
Name: CUST_SRCH_D_DS
Location: /CUST_SRCH_D_DS-1.0.0.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: CUST_SRCH_OP
Current Params: {DSID={100008492,10001565,100016993,100097721}}
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
com.teradata.jdbc.jdbc_4.util.JDBCException: [Teradata Database] [TeraJDBC 14.00.00.13] [Error 3810] [SQLState 42S22] Column/Parameter 'gca.a.peson_id' does not exist.
</axis2ns233:DataServiceFault></soapenv:Body></soapenv:Envelope>
16:05:55,464 [-] [HttpServerWorker-13] INFO TRACE_LOGGER End : Log mediator