2017-09-18 45 views
0

我正在使用WSO2 Payload工廠創建一個soap請求,其中一些信息發送給第三方。此有效內容刪除我的肥皂標題值。任何人都可以請幫我解決這個問題。我可以看到只有body正在被傳遞並且header正在被刪除。Soap Header在wso2 esb中的有效負載工廠中被刪除

我不得不使用下面的請求得到一些象徵性的

 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:oas="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:sec="http://schemas.cdi.ltsa.govt.nz/SecurityService.xsd" xmlns:sec1="http://schemas.cdi.ltsa.govt.nz/SecurityService" xmlns:oas1="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:acc="http://schemas.cdi.ltsa.govt.nz/Security/AccessControl/" xmlns:sec2="http://localhost/Schema/SecurityService"> 
     <soapenv:Header> 
      <oas:Security> 
      <oas:UserNameToken> 
       <oas:UserName>XXXX</oas:UserName> 
       <oas:Password>XXXX</oas:Password> 
      </oas:UserNameToken> 
      </oas:Security> 
     </soapenv:Header> 
     <soapenv:Body> 
      <acc:AuthenticateClient> 
      <sec2:AuthenticateClientRequest> 
       <sec2:RequestBody></sec2:RequestBody> 
      </sec2:AuthenticateClientRequest> 
      </acc:AuthenticateClient> 
     </soapenv:Body> 
    </soapenv:Envelope> 







<header name="SOAPAction" scope="transport" value="http://schemas.cdi.ltsa.govt.nz/Security/AccessControl/AuthenticateClient"/> 
    <script language="js"><![CDATA[var envelope = mc.getEnvelopeXML(); 
    var oas = new Namespace('http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'); 
mc.addHeader(false, <oas:Security xmlns:oas="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> 
<oas:UserNameToken> 
      <oas:UserName>XXXX</oas:UserName> 
      <oas:Password>XXXX</oas:Password> 
     </oas:UserNameToken> 
     </oas:Security> 
);]]></script> 
    <payloadFactory media-type="xml"> 
     <format> 
      <Body> 
       <AuthenticateClient> 
        <AuthenticateClientRequest> 
         <RequestBody/> 
        </AuthenticateClientRequest> 
       </AuthenticateClient> 
      </Body> 
     </format> 
     <args> 
      <arg evaluator="xml" expression="$ctx:UserName" xmlns:ns="http://org.apache.synapse/xsd"/> 
      <arg evaluator="xml" expression="$ctx:Password" xmlns:ns="http://org.apache.synapse/xsd"/> 
     </args> 
    </payloadFactory> 
    <log level="full"/> 
    <call> 
     <endpoint> 
      <address trace="disable" uri="http://XXXX:28080/services/XXXX"/> 
     </endpoint> 
    </call> 
    <respond/> 

日誌:

wire << "POST /services/B2BProxyVechicle HTTP/1.1[\r][\n]" 
[2017-09-18 16:38:12,230] DEBUG - wire << "SOAPAction: http://XXXXX/AccessControl/AuthenticateClient[\r][\n]" 
[2017-09-18 16:38:12,225] DEBUG - SequenceMediator End : Sequence key=<Value {name ='null', keyValue ='PPSR_VehicleInfo_IN_SEQ'}> 
[2017-09-18 16:38:12,245] DEBUG - SequenceMediator End : Sequence <anonymous> 
[2017-09-18 16:38:12,238] DEBUG - wire << "Accept-Encoding: gzip,deflate[\r][\n]" 
[2017-09-18 16:38:12,253] DEBUG - wire << "Content-Type: text/xml; charset=UTF-8[\r][\n]" 
[2017-09-18 16:38:12,257] DEBUG - wire << "Transfer-Encoding: chunked[\r][\n]" 
[2017-09-18 16:38:12,261] DEBUG - wire << "Host: 172.17.134.192:28080[\r][\n]" 
[2017-09-18 16:38:12,265] DEBUG - wire << "Connection: Keep-Alive[\r][\n]" 
[2017-09-18 16:38:12,268] DEBUG - wire << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]" 
[2017-09-18 16:38:12,273] DEBUG - wire << "[\r][\n]" 
[2017-09-18 16:38:12,275] DEBUG - wire << "a3[\r][\n]" 
[2017-09-18 16:38:12,278] DEBUG - wire << "<Body xmlns="http://ws.apache.org/ns/synapse"><AuthenticateClient><AuthenticateClientRequest><RequestBody/></AuthenticateClientRequest></AuthenticateClient></Body>[\r][\n]" 
[2017-09-18 16:38:12,292] DEBUG - wire << "0[\r][\n]" 
[2017-09-18 16:38:12,294] DEBUG - wire << "[\r][\n]" 
[2017-09-18 16:38:12,305] DEBUG - wire >> "HTTP/1.1 200 OK[\r][\n]" 
[2017-09-18 16:38:12,309] DEBUG - wire >> "Host: lux2253.extnp.wd.govt.nz:8243[\r][\n]" 
[2017-09-18 16:38:12,313] DEBUG - wire >> "SOAPAction: "http://XXXXXX/AccessControl/AuthenticateClient"[\r][\n]" 
[2017-09-18 16:38:12,321] DEBUG - wire >> "Accept-Encoding: gzip,deflate[\r][\n]" 
[2017-09-18 16:38:12,325] DEBUG - wire >> "Content-Type: text/xml; charset=UTF-8[\r][\n]" 
[2017-09-18 16:38:12,330] DEBUG - wire >> "Date: Mon, 18 Sep 2017 04:38:12 GMT[\r][\n]" 
[2017-09-18 16:38:12,334] DEBUG - wire >> "Transfer-Encoding: chunked[\r][\n]" 
[2017-09-18 16:38:12,337] DEBUG - wire >> "Connection: Keep-Alive[\r][\n]" 
[2017-09-18 16:38:12,341] DEBUG - wire >> "[\r][\n]" 
[2017-09-18 16:38:12,343] DEBUG - wire >> "94[\r][\n]" 
[2017-09-18 16:38:12,346] DEBUG - wire >> "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body/></soapenv:Envelope>[\r][\n]" 
[2017-09-18 16:38:12,360] DEBUG - wire >> "0[\r][\n]" 
[2017-09-18 16:38:12,362] DEBUG - wire >> "[\r][\n]" 
[2017-09-18 16:38:12,364] DEBUG - SynapseCallbackReceiver Callback removed for request message id : urn:uuid:52234a6e-398c-4a19-aa3a-c66eaf170873. Pending callbacks count : 0 
[2017-09-18 16:38:12,375] DEBUG - SynapseCallbackReceiver Synapse received an asynchronous response message 

回答