Missing order total Paypal express check out - paypal

i'm trying to make SOAP call using Salesforce apex code to Paypal express checkout API,
but i'm facing this problem missing order total , also i'm sure that i put the order total within my SOAP call , here's my SOAP call form:
<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header>
<RequesterCredentials xmlns="urn:ebay:api:PayPalAPI">
<Credentials xmlns="urn:ebay:apis:eBLBaseComponents">
<Username>xxx</Username>
<Password>xxx</Password>
<Signature>xxx</Signature>
</Credentials>
</RequesterCredentials>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<SetExpressCheckoutReq xmlns="urn:ebay:api:PayPalAPI">
<SetExpressCheckoutRequest>
<Version xmlns="urn:ebay:apis:eBLBaseComponents">78</Version>
<SetExpressCheckoutRequestDetails>
<ReturnURL>www.success.com</ReturnURL>
<CancelURL>www.cancel.com</CancelURL>
<OrderTotal currencyID="USD">1</OrderTotal>
</SetExpressCheckoutRequestDetails>
</SetExpressCheckoutRequest>
</SetExpressCheckoutReq>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I found the problem , it's in the SOAP
string doExpressCheckout = '';
doExpressCheckout += '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:ebay:api:PayPalAPI" xmlns:urn1="urn:ebay:apis:eBLBaseComponents">';
doExpressCheckout += '<soapenv:Header>';
doExpressCheckout += '<urn:RequesterCredentials>';
doExpressCheckout += '<urn1:Credentials>';
doExpressCheckout += '<urn1:Username>'+un+'</urn1:Username>';
doExpressCheckout += '<urn1:Password>'+pw+'</urn1:Password>';
doExpressCheckout += '<urn1:Signature>'+sig+'</urn1:Signature>';
doExpressCheckout += '</urn1:Credentials>';
doExpressCheckout += '</urn:RequesterCredentials>';
doExpressCheckout += '</soapenv:Header>';
doExpressCheckout += '<soapenv:Body>';
doExpressCheckout += '<urn:DoExpressCheckoutPaymentReq>';
doExpressCheckout += '<urn:DoExpressCheckoutPaymentRequest>';
doExpressCheckout += '<urn1:Version>'+version+'</urn1:Version>';
doExpressCheckout += '<urn1:DoExpressCheckoutPaymentRequestDetails>';
doExpressCheckout += '<urn1:Token>'+token+'</urn1:Token>';
doExpressCheckout += '<urn1:PayerID>'+payerID+'</urn1:PayerID>';
doExpressCheckout += '<urn1:PaymentDetails>';
doExpressCheckout += '<urn1:OrderTotal currencyID="'+UsedCurrency+'">'+amount+'</urn1:OrderTotal>';
doExpressCheckout += '</urn1:PaymentDetails>';
doExpressCheckout += '</urn1:DoExpressCheckoutPaymentRequestDetails>';
doExpressCheckout += '</urn:DoExpressCheckoutPaymentRequest>';
doExpressCheckout += '</urn:DoExpressCheckoutPaymentReq>';
doExpressCheckout += '</soapenv:Body>';
doExpressCheckout += '</soapenv:Envelope>';

Related

Postman test fails while parsing the xml soap response

I am using POSTMAN to send a SOAP request and below is my soapenv response received. I would like to test for the below value received in my postman test, but the post man test fails, could someone advise on what to do here ?
LicStatus
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:schemas.general.com.au:api:other">
<soapenv:Header xmlns:urn="urn:schemas.general.com.au:api:other" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<header xmlns:urn="urn:schemas.general.com.au:api:other" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.cordys.com/General/1.0/">
<msg-id>005056B9-3921-A1E9-A327-64509F7362DC</msg-id>
<messageoptions noreply="true"/>
</header>
</soapenv:Header>
<soapenv:Body>
<getSupplierDataResponse xmlns:urn="urn:schemas.general.com.au:api:other" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:schemas.general.com.au:api:other" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns6="http://schemas.cordys.com/default_005056B9-5D92-A1E9-904D-128C719CE2DD" xmlns:ns5="http://schemas.cordys.com/casemanagement/1.0" xmlns:ns4="http://schemas.XXTGGHG.org/2004/07/STRD.Models" xmlns:ns3="urn:schemas.general.com.au:canonical:technical:v1" xmlns:ns2="urn:schemas.general.com.au:api:other" xmlns:bpm="http://schemas.cordys.com/default" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0">
<CustomerData>
<DateLicenceExpires>28/01/2020</DateLicenceExpires>
<Demonstration_Method>Certification</Demonstration_Method>
<AuditLastAuditDate>05/03/2018</AuditLastAuditDate>
<AuditOutcome>Non Compliance</AuditOutcome>
<HeadOfficeRegion/>
<ScopeOfLicencing>YES</ScopeOfLicencing>
<LicStatus>Licensed</LicStatus>
</CustomerData>
<OperationResult xmlns="urn:schemas.general.com.au:canonical:technical:v1">
<Status>00</Status>
<StatusMessage>Success</StatusMessage>
</OperationResult>
</getSupplierDataResponse>
</soapenv:Body>
</soapenv:Envelope>
Below is the post man test:
pm.test('Verify the LicStatus', function() {
var responseJson = xml2Json(responseBody);
pm.expect(responseJson.results[0].LicStatus).to.eql("Licensed");
})
Try something like this:
pm.test('Verify the LicStatus', function() {
var xmlTree = xml2Json(responseBody);
var licenseStatus = xmlTree['soapenv:Envelope']['soapenv:Body'].getSupplierDataResponse.CustomerData.LicStatus;
pm.expect(licenseStatus).to.eql("Licensed");
})

migrate axis soap webservice to spring ws - RequestPayload object values coming as null in endpoint method

Working with an old wsdl file generated with AXIS to make it work with spring ws. After doing some tweaks and all, i could generate the java sources with the old wsdl.
Now i am trying to make a request from soap UI , But request values are shown as null in endpoint method. Request is coming in backend properly but not values.
WSDL file
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:onl="http://online.mysite.com">
<soapenv:Header/>
<soapenv:Body>
<onl:getSummary soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<in0 xsi:type="onl:SummaryObject">
<docid xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">doc123</docid>
<amount xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</amount>
<duenew xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</duenew>
<reference xsi:type="xsd:long">?</reference>
<sortBy xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</sortBy>
<startDate xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</startDate>
</in0>
</onl:getSummary>
</soapenv:Body>
</soapenv:Envelope>
Soap Request:
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:onl="http://online.mysite.com">
<soapenv:Header/>
<soapenv:Body>
<onl:getSummary soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<in0 xsi:type="onl:SummaryObject">
<docid xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">doc123</docid>
<amount xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</amount>
<duenew xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</duenew>
<reference xsi:type="xsd:long">121212121</reference>
<sortBy xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</sortBy>
<startDate xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</startDate>
<visibility xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</visibility>
</in0>
</onl:getSummary>
</soapenv:Body>
</soapenv:Envelope>
Endpoint Method:
#PayloadRoot(namespace = NAMESPACE_URI, localPart ="getSummary")
#ResponsePayload
public JAXBElement<EObjects> getSummary(#RequestPayload SummaryObject summaryObject) {
System.out.println("Am done with this"+summaryObject.getDocId());
ObjectFactory factory = new ObjectFactory();
EObjects objects = factory.createEObjects();
QName qname = new QName("http://online.mysite.com", "eobjects");
return new JAXBElement(qname, EObjects.class, objects);
}
WSDL generated in axis 1 is no longer been supported by spring ws or CXF. So that generated java classes from WSDL wont have required information that is needed for unmarshelling of request by JAXB in spring. Thus request object will come as null.
I have done a work around which has 2 things to do
Add xml root element annotation on top of the request object class generated from WSDL.
#XmlRootElement(name="getSomething",namespace =
"http://yoursite.com")
unmarshell the request object manually as shown below:
code
SoapMessage message = (SoapMessage) messageContext.getRequest();
ByteArrayOutputStream out = new ByteArrayOutputStream();
message.writeTo(out);
String strMsg = new String(out.toByteArray()); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
DocumentBuilder db = dbf.newDocumentBuilder();
Document d = db.parse(new InputSource(new StringReader(strMsg)));
Node getrequestObject = d.getElementsByTagName("yourtag").item(0);
JAXBContext jc = JAXBContext.newInstance(MyRequestObject.class);
Unmarshaller unmarshaller = jc.createUnmarshaller();
JAXBElement<SummaryObject> je = unmarshaller.unmarshal(new
DOMSource(getrequestObject), MyRequestObject.class);

Basic auth credentials using headers in soap on groovy

I'm trying to connect to WSDL server, which requires basic auth along with the body. I tried hitting with SOAPUI, and was able to do so. While working for the same in groovy and using wslite package for SOAP call, I'm getting error as "Password required".
I tried the tutorial on https://github.com/jwagenleitner/groovy-wslite, but the method described (in Usage block) didn't help.
I'm using groovy for this.
Below is the raw code from SOAP UI, with response 200OK
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:w="http://xmlns.oracle.com/Enterprise/Tools/schemas/W_CHKLST_CREATE_REQ.1">
<soapenv:Header><wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsse:UsernameToken wsu:Id="UsernameToken-83C962CC24EAB67F1D15586306447678"><wsse:Username>userName</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">Password</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">JLTdeK6Yg3D64+2qz5xnbA==</wsse:Nonce><wsu:Created>2019-05-23T16:57:24.767Z</wsu:Created></wsse:UsernameToken></wsse:Security></soapenv:Header>
<soapenv:Body>
<w:helloWorld/>
</soapenv:Body>
</soapenv:Envelope>
which results in a 200OK from SOAPUI
HTTP/1.1 200 OK
Date: Wed, 22 May 2019 21:54:12 GMT
Content-Type: text/xml; charset=UTF-8
Content-Length: 3570
My Groovy Code,
def client = new SOAPClient("URL of WSDL")
def response = client.send(SOAPAction: "someAction",
connectTimeout:10000,
readTimeout:20000,
useCaches:false,
followRedirects:false) {
version SOAPVersion.V1_2 // SOAPVersion.V1_1 is default
soapNamespacePrefix "soapenv" // "soap-env" is default
envelopeAttributes "xmlns:ns":"http://example.weather.org"
header {
security("xmlns:ns20":"http://SecurityOpenXSD"){
"ns20:Username"("username")
"ns20:Password"("password")
}
}
body {
"ns:helloWorld" {
}
}
}
which gives soap xml as
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand='1'
xmlns:wsse='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
xmlns:wsu='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'>
<wsse:UsernameToken wsu:Id='UsernameToken-83C962CC24EAB67F1D15586299636605'>
<wsse:Username>userName</wsse:Username>
<wsse:Password
Type='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'>
password
</wsse:Password>
<wsse:Nonce
EncodingType='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary'>
JLTdeK6Yg3D64+2qz5xnbA==
</wsse:Nonce>
<wsu:Created>2019-05-23T10:07:52.913Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
But i get error as password required,
<?xml version="1.0" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<Code><Value>SOAP-ENV:Receiver</Value></Code>
<Reason><Text>null</Text></Reason>
<Detail><IBResponse type="error" xmlns=""><DefaultTitle> Error Response</DefaultTitle>
<StatusCode>20</StatusCode>
<DefaultMessage><![CDATA[User Password required]]></DefaultMessage>
</IBResponse></Detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>

MS Dynamics SOAP endpoint call (Active Directory auth)

I have an onPremise Dynamics CRM instance setup with HTTP and AD authentication, without any ADFS.
I'm willing to do a basic web service call (with NTLM) :
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ser="http://schemas.microsoft.com/xrm/2011/Contracts/Services" xmlns:con="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<soap:Header/>
<soap:Body>
<ser:Retrieve>
<!--Optional:-->
<ser:entityName>?</ser:entityName>
<!--Optional:-->
<ser:id>?</ser:id>
<!--Optional:-->
<ser:columnSet>
<!--Optional:-->
<con:AllColumns>?</con:AllColumns>
<!--Optional:-->
<con:Columns>
<!--Zero or more repetitions:-->
<arr:string>?</arr:string>
</con:Columns>
</ser:columnSet>
</ser:Retrieve>
</soap:Body>
</soap:Envelope>
...But it seems I'm missing something since I get this response :
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
<a:Action s:mustUnderstand="1">http://www.w3.org/2005/08/addressing/soap/fault</a:Action>
</s:Header>
<s:Body>
<s:Fault>
<s:Code>
<s:Value>s:Sender</s:Value>
<s:Subcode>
<s:Value xmlns:a="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">a:InvalidSecurity</s:Value>
</s:Subcode>
</s:Code>
<s:Reason>
<s:Text xml:lang="en-US">An error occurred when verifying security for the message.</s:Text>
</s:Reason>
</s:Fault>
</s:Body>
</s:Envelope>
My guess so far is I'm missing something in the SOAP header but I don't know why, maybe something to do server side?
Maybe someone would have a clue?
[2016-03-01 11:12:02.248] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 146 |Category: Platform.Sdk |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: a9210b00-7f84-43dc-a794-d8f9697c8b53 | ServiceModelTraceRedirector.TraceData ilOffset = 0x45
><TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Error"><TraceIdentifier>http://msdn.microsoft.com/en-US/library/System.ServiceModel.Diagnostics.ThrowingException.aspx</TraceIdentifier><Description>Throwing an exception.</Description><AppDomain>/LM/W3SVC/2/ROOT-2-131012583114393978</AppDomain><Exception><ExceptionType>System.ServiceModel.Security.MessageSecurityException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Security processor was unable to find a security header in the message. This might be because the message is an unsecured fault or because there is a binding mismatch between the communicating parties. This can occur if the service is configured for security and the client is not using security.</Message><StackTrace> at System.ServiceModel.Security.SecurityStandardsManager.CreateReceiveSecurityHeader(Message message, String actor, SecurityAlgorithmSuite algorithmSuite, MessageDirection direction)
> at System.ServiceModel.Security.MessageSecurityProtocol.CreateSecurityHeader(Message message, String actor, MessageDirection transferDirection, SecurityStandardsManager standardsManager)
> at System.ServiceModel.Security.MessageSecurityProtocol.ConfigureReceiveSecurityHeader(Message message, String actor, SecurityProtocolCorrelationState[] correlationStates, SecurityStandardsManager standardsManager, IList`1&amp; supportingAuthenticators)
> at System.ServiceModel.Security.SymmetricSecurityProtocol.VerifyIncomingMessageCore(Message&amp; message, String actor, TimeSpan timeout, SecurityProtocolCorrelationState[] correlationStates)
> at System.ServiceModel.Security.MessageSecurityProtocol.VerifyIncomingMessage(Message&amp; message, TimeSpan timeout, SecurityProtocolCorrelationState[] correlationStates)
> at System.ServiceModel.Channels.SecurityChannelListener`1.ServerSecurityChannel`1.VerifyIncomingMessage(Message&amp; message, TimeSpan timeout, SecurityProtocolCorrelationState[] correlationState)
> at System.ServiceModel.Channels.SecurityChannelListener`1.SecurityReplyChannel.ProcessReceivedRequest(RequestContext requestContext, TimeSpan timeout)
> at System.ServiceModel.Channels.SecurityChannelListener`1.ReceiveItemAndVerifySecurityAsyncResult`2.OnInnerReceiveDone()
> at System.ServiceModel.Channels.SecurityChannelListener`1.ReceiveItemAndVerifySecurityAsyncResult`2.InnerTryReceiveCompletedCallback(IAsyncResult result)
> at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
> at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
> at System.Runtime.InputQueue`1.AsyncQueueReader.Set(Item item)
> at System.Runtime.InputQueue`1.Dispatch()
> at System.Runtime.IOThreadScheduler.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
> at System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
> at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
>
It means the incoming message should have a security header, which wasn't in the SOAP request, that's true.
Then I don't know what kind of security header I should add to my SOAP request.
I would suggest to capture your SOAP call using SoapClient as it mentioned here - https://msdn.microsoft.com/en-us/library/gg594434(v=crm.7).aspx#BKMK_CaptureHTTPTraffic

Spring Integration should route Message (with SOAP Headers)

I am trying to write configure a gateway, which should take a complete SOAP Message and then delegate it to another SOAP Provider (incl. all SOAP headers of the first request).
What I have done so far:
1) web.xml
MessageDispatcherServlet with Mapping:
<servlet-mapping>
<servlet-name>spring-ws</servlet-name>
<url-pattern>/appservices/*</url-pattern>
</servlet-mapping>
2) Configuration with an Endpoint-Mapping
<bean class="org.springframework.ws.server.endpoint.mapping.UriEndpointMapping">
<property name="defaultEndpoint" ref="ws-in-gw"/>
</bean>
3) Configuration of Spring Integration inbound-gateway and outbound-gateway
<int-ws:inbound-gateway id="ws-in-gw"
request-channel="in"
reply-channel="out"
mapped-request-headers="*" />
<int:channel id="in" />
<int:channel id="out" />
<int-ws:outbound-gateway
id="ws-out-gw-status"
request-channel="in-status"
reply-channel="out-status"
uri="http://${delegationServer}/${delegation.contextroot}/soap/AnotherService"
interceptor="soapEnricher"
</int-ws:outbound-gateway>
<bean id="soapEnricher" class="foo.bar.SoapHeaderEnricher" />
public class SoapHeaderEnricher implements ClientInterceptor {
#Override
public boolean handleRequest(MessageContext messageContext) throws WebServiceClientException {
try {
SoapMessage soapMessage = (SoapMessage) messageContext.getRequest();
SoapHeader sh = soapMessage.getSoapHeader();
// can use sh.addHeaderElement(new QName(...)) now, but where are the original Headers???
} catch () {
}
}
My first Problem was, that the original SOAP Headers had been cut of, so I introduced the ' mapped-request-headers="*" ' attribute at the inbound gateway.
When I now configure a wire-tap, I see the Headers (myToken:MySecretToken) are received:
DEBUG 10:46:53 - [Payload DOMSource content=javax.xml.transform.dom.DOMSource#24a6ce98][Headers={errorChannel=org.springframework.messaging.core.GenericMessagingTemplate$TemporaryReplyChannel#43456ff4, myToken:MySecretToken=org.springframework.ws.soap.saaj.SaajSoapHeaderElement#3b91ead, ...}]
This is the SOAP Message for my test:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:stat="http://status.service.promakler.provinzial.com/">
<soapenv:Header>
<myToken:MySecretToken xmlns=""
xmlns:myToken="http://foo.bar">12345</myToken:MySecretToken>
</soapenv:Header>
<soapenv:Body>
<stat:getStatus/>
</soapenv:Body>
</soapenv:Envelope>
So the Headers are now in my Message, but in the ClientInterceptor, there is no way to get the Headers (just the payload)?! I can add new Headers, but how can I get the original Header?
Can anybody give me a hint (or perhaps there is even a quiet simpler solution??)
Regards
Timo
Try to introduce a custom extension of DefaultSoapHeaderMapper and override populateUserDefinedHeader to extract those SaajSoapHeaderElement from the MessageHeaders and populate them to the SoapHeader. And finally inject your solution to the header-mapper of your <int-ws:outbound-gateway>.