Add a soap Header to BizTalk SOAP adapter - web-services

We have the webservice xml request as below. for this I have developed the Orchestration. But while we are sending the request to client, we need to add the SOAP header.
Could you suggest me, how can I do this?
WebService XML Request
<?xml version="1.0" encoding="utf-8" ?>
<Request xmlns="http://modeler.ass.abc/efgh/">
<HeaderReq>
<PartnerID>E0</PartnerID>
<TimeStampSubmitted>2013-11-21T18:19:11</TimeStampSubmitted>
<Version>3.0</Version>
</HeaderReq>
<ApplicationREQ>
<ID>1</ID>
</ApplicationREQ>
</Request>
SOAP Header
<soapenv:Header>
<wsse:Security xmlns:wsse="http://adb.ddad-sdfad.org/wss/2010/01/fasd-201201-wss-wssecurity-secext-1.0.xsd">
<wsu:Timestamp wsu:Id="TS-10">
<wsu:Created>2013-10-11T17:26:52.890Z</wsu:Created>
<wsu:Expires>2013-10-11T17:51:52.890Z</wsu:Expires>
</wsu:Timestamp>
<wsse:UsernameToken wsu:Id="UsernameToken-10">
<wsse:Username>User</wsse:Username>
<wsse:Password Type="http://adb.ddad-sdfad.org/wss/2010/01/fasd-201201-wss-username-token-profile-1.0#PasswordText">xxxxxxx</wsse:Password>
<wsse:Nonce EncodingType="http://adb.ddad-sdfad.org/wss/2010/01/fasd-201201-wss-soap-message-security-1.0#Base64Binary">xxxxxxx</wsse:Nonce>
<wsu:Created>2013-10-11T17:26:52.889Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>

You would need to use the property WCF.OutboundCustomHeaders
Example:
xmlDoc.LoadXml("<headers><Origination>Home</Origination><Destination>Work</Destination></headers>");
And then
RequestMessageInstance(WCF.OutboundCustomHeaders) = xmlDoc.OuterXml;
I found this example at this page: http://msdn.microsoft.com/en-us/library/bb246026.aspx
Hope this helps!

Related

Using Saved Search in NetSuite SuiteTalk Web services Search Operation

I've created and saved a search in NetSuite. Now I want to use the same search in SuiteTalk web services call. There is no option to set SavedSearchId neither in CustomerSearchBasic nor in CustomerSearch. So I used CustomerSearchAdvanced as below
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:messages_2016_1.platform.webservices.netsuite.com" xmlns:urn1="urn:core_2016_1.platform.webservices.netsuite.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<urn:searchPreferences>
<urn:pageSize>10</urn:pageSize>
</urn:searchPreferences>
<urn:applicationInfo>
<urn:applicationId>some id</urn:applicationId>
</urn:applicationInfo>
<urn:passport>
<!-- With Credentials -->
</urn:passport>
</soapenv:Header>
<soapenv:Body>
<urn:search>
<urn:searchRecord ns7:savedSearchId = "732" xsi:type="ns7:CustomerSearchAdvanced"
xmlns:ns7="urn:relationships_2016_1.lists.webservices.netsuite.com">
</urn:searchRecord>
</urn:search>
</soapenv:Body>
</soapenv:Envelope>
But I am getting this error from NetSuite server
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2016_1.platform.webservices.netsuite.com">
<platformMsgs:nsId>some id</platformMsgs:nsId>
</platformMsgs:documentInfo>
</soapenv:Header>
<soapenv:Body>
<searchResponse xmlns="urn:messages_2016_1.platform.webservices.netsuite.com">
<platformCore:searchResult xmlns:platformCore="urn:core_2016_1.platform.webservices.netsuite.com">
<platformCore:status isSuccess="false">
<platformCore:statusDetail type="ERROR">
<platformCore:code>UNEXPECTED_ERROR</platformCore:code>
<platformCore:message>An unexpected error occurred. Error ID: iufcwwrkjcqii34kqgag</platformCore:message>
</platformCore:statusDetail>
</platformCore:status>
</platformCore:searchResult>
</searchResponse>
</soapenv:Body>
</soapenv:Envelope>
I am not able to get information about error Id : iufcwwrkjcqii34kqgag
Is it possible to use Saved Search in SuiteTalk Web services? If yes, what call and types should I use?
I am using SOAP UI project created using this wsdl
Below is the successfully working SOAP request and what you need to configure the Netsuite Account, Token, consumer key, nonce, timestamp and signature. Use the saved search id (here -7734) to invoke the saved search
<soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:messages="urn:messages_2020_1.platform.webservices.netsuite.com" xmlns:accountingLists="urn:accounting_2020_1.lists.webservices.netsuite.com" xmlns:employeesLists="urn:employees_2020_1.lists.webservices.netsuite.com" xmlns:employeesTransactionsTypes="urn:types.employees_2020_1.transactions.webservices.netsuite.com" xmlns:demandplanningTransactions="urn:demandplanning_2020_1.transactions.webservices.netsuite.com" xmlns:common="urn:common_2020_1.platform.webservices.netsuite.com" xmlns:commonTypes="urn:types.common_2020_1.platform.webservices.netsuite.com" xmlns:accountingListsTypes="urn:types.accounting_2020_1.lists.webservices.netsuite.com" xmlns:customizationSetup="urn:customization_2020_1.setup.webservices.netsuite.com" xmlns:inventoryTransactionsTypes="urn:types.inventory_2020_1.transactions.webservices.netsuite.com" xmlns:filecabinetDocuments="urn:filecabinet_2020_1.documents.webservices.netsuite.com" xmlns:bankTransactionsTypes="urn:types.bank_2020_1.transactions.webservices.netsuite.com" xmlns:communicationGeneralTypes="urn:types.communication_2020_1.general.webservices.netsuite.com" xmlns:customizationSetupTypes="urn:types.customization_2020_1.setup.webservices.netsuite.com" xmlns:supplychainListsTypes="urn:types.supplychain_2020_1.lists.webservices.netsuite.com" xmlns:core="urn:core_2020_1.platform.webservices.netsuite.com" xmlns:coreTypes="urn:types.core_2020_1.platform.webservices.netsuite.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:supplychainLists="urn:supplychain_2020_1.lists.webservices.netsuite.com" xmlns:demandplanningTransactionsTypes="urn:types.demandplanning_2020_1.transactions.webservices.netsuite.com" xmlns:websiteLists="urn:website_2020_1.lists.webservices.netsuite.com" xmlns:salesTransactions="urn:sales_2020_1.transactions.webservices.netsuite.com" xmlns:salesTransactionsTypes="urn:types.sales_2020_1.transactions.webservices.netsuite.com" xmlns:relationshipsLists="urn:relationships_2020_1.lists.webservices.netsuite.com" xmlns:inventoryTransactions="urn:inventory_2020_1.transactions.webservices.netsuite.com" xmlns:employeesListsTypes="urn:types.employees_2020_1.lists.webservices.netsuite.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:customersTransactions="urn:customers_2020_1.transactions.webservices.netsuite.com" xmlns:schedulingActivitiesTypes="urn:types.scheduling_2020_1.activities.webservices.netsuite.com" xmlns:financialTransactions="urn:financial_2020_1.transactions.webservices.netsuite.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:relationshipsListsTypes="urn:types.relationships_2020_1.lists.webservices.netsuite.com" xmlns:employeesTransactions="urn:employees_2020_1.transactions.webservices.netsuite.com" xmlns:faults="urn:faults_2020_1.platform.webservices.netsuite.com" xmlns:marketingListsTypes="urn:types.marketing_2020_1.lists.webservices.netsuite.com" xmlns:communicationGeneral="urn:communication_2020_1.general.webservices.netsuite.com" xmlns:faultsTypes="urn:types.faults_2020_1.platform.webservices.netsuite.com" xmlns:supportListsTypes="urn:types.support_2020_1.lists.webservices.netsuite.com" xmlns:websiteListsTypes="urn:types.website_2020_1.lists.webservices.netsuite.com" xmlns:purchasesTransactions="urn:purchases_2020_1.transactions.webservices.netsuite.com" xmlns:financialTransactionsTypes="urn:types.financial_2020_1.transactions.webservices.netsuite.com" xmlns:schedulingActivities="urn:scheduling_2020_1.activities.webservices.netsuite.com" xmlns:bankTransactions="urn:bank_2020_1.transactions.webservices.netsuite.com" xmlns:marketingLists="urn:marketing_2020_1.lists.webservices.netsuite.com" xmlns:customersTransactionsTypes="urn:types.customers_2020_1.transactions.webservices.netsuite.com" xmlns:purchasesTransactionsTypes="urn:types.purchases_2020_1.transactions.webservices.netsuite.com" xmlns:generalTransactions="urn:general_2020_1.transactions.webservices.netsuite.com" xmlns:filecabinetDocumentsTypes="urn:types.filecabinet_2020_1.documents.webservices.netsuite.com">
<soap:Header>
<urn:tokenPassport xmlns:urn="urn:messages_2020_1.platform.webservices.netsuite.com">
<ns8:account xmlns:ns8="urn:core_2020_1.platform.webservices.netsuite.com">NetSuite Account</ns8:account>
<ns8:consumerKey xmlns:ns8="urn:core_2020_1.platform.webservices.netsuite.com">Consumer Key</ns8:consumerKey>
<ns8:token xmlns:ns8="urn:core_2020_1.platform.webservices.netsuite.com">Token</ns8:token>
<ns8:nonce xmlns:ns8="urn:core_2020_1.platform.webservices.netsuite.com">nonce</ns8:nonce>
<ns8:timestamp xmlns:ns8="urn:core_2020_1.platform.webservices.netsuite.com">timestamp</ns8:timestamp>
<ns8:signature xmlns:ns8="urn:core_2020_1.platform.webservices.netsuite.com" algorithm="HMAC_SHA256">t/WP6f33JePu7rdqtnInwPtJSRIB24RNy3GKhDDpn94=</ns8:signature>
</urn:tokenPassport>
<ns1:preferences xmlns:ns1="urn:messages.platform.webservices.netsuite.com">
<ns2:ignoreReadOnlyFields xmlns:ns2="urn:messages_2020_1.platform.webservices.netsuite.com">true</ns2:ignoreReadOnlyFields>
</ns1:preferences>
<ns3:searchPreferences xmlns:ns3="urn:messages.platform.webservices.netsuite.com">
<ns4:bodyFieldsOnly xmlns:ns4="urn:messages_2020_1.platform.webservices.netsuite.com">true</ns4:bodyFieldsOnly>
<ns5:pageSize xmlns:ns5="urn:messages_2020_1.platform.webservices.netsuite.com">999</ns5:pageSize>
</ns3:searchPreferences>
</soap:Header>
<soap:Body>
<ns24:search xmlns:ns5="urn:filecabinet_2020_1.documents.webservices.netsuite.com" xmlns:ns6="urn:relationships_2020_1.lists.webservices.netsuite.com" xmlns:ns3="urn:common_2020_1.platform.webservices.netsuite.com" xmlns:ns4="urn:communication_2020_1.general.webservices.netsuite.com" xmlns:ns9="urn:sales_2020_1.transactions.webservices.netsuite.com" xmlns:ns7="urn:support_2020_1.lists.webservices.netsuite.com" xmlns:ns8="urn:accounting_2020_1.lists.webservices.netsuite.com" xmlns="urn:core_2020_1.platform.webservices.netsuite.com" xmlns:ns19="urn:supplychain_2020_1.lists.webservices.netsuite.com" xmlns:ns18="urn:demandplanning_2020_1.transactions.webservices.netsuite.com" xmlns:ns2="urn:scheduling_2020_1.activities.webservices.netsuite.com" xmlns:ns17="urn:marketing_2020_1.lists.webservices.netsuite.com" xmlns:ns16="urn:employees_2020_1.transactions.webservices.netsuite.com" xmlns:ns15="urn:website_2020_1.lists.webservices.netsuite.com" xmlns:ns14="urn:employees_2020_1.lists.webservices.netsuite.com" xmlns:ns13="urn:customization_2020_1.setup.webservices.netsuite.com" xmlns:ns24="urn:messages_2020_1.platform.webservices.netsuite.com" xmlns:ns12="urn:financial_2020_1.transactions.webservices.netsuite.com" xmlns:ns23="urn:faults_2020_1.platform.webservices.netsuite.com" xmlns:ns11="urn:customers_2020_1.transactions.webservices.netsuite.com" xmlns:ns22="urn:general_2020_1.transactions.webservices.netsuite.com" xmlns:ns10="urn:purchases_2020_1.transactions.webservices.netsuite.com" xmlns:ns21="urn:inventory_2020_1.transactions.webservices.netsuite.com" xmlns:ns20="urn:bank_2020_1.transactions.webservices.netsuite.com">
<ns24:searchRecord xsi:type="ns13:CustomRecordSearchAdvanced" savedSearchId="7734"/>
</ns24:search>
</soap:Body>
</soap:Envelope>

Mule 3.7. Add custom SOAP header to web-service-consumer

I am trying to customize the soap header in Mule 3.7. By default using the web-service-consumer I get the following:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<wsse:Security 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" soap:mustUnderstand="1">
<wsse:UsernameToken wsu:Id="UsernameToken-6CF0E33EE8AA1E3DB414700278333141">
<wsse:Username>TEST/wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"/>
</wsse:UsernameToken>
</wsse:Security>
</SOAP-ENV:Header>
However, I would like to change the SOAP header to be:
<soap:Header>
<Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<UsernameToken>
<Username>TEST</Username>
</UsernameToken>
</Security>
Where in Mule do I need to add the below?
<set-property propertyName="soap.Authorization"
value="<auth>Bearer MWYxMDk4ZDktNzkyOC00Z</auth>"/>
Does the above need to be added in the ws:consumer-config below?
<ws:consumer-config name="WSConsumerConfig" wsdlLocation="${wsdl.location}"
service="aService" port="aServiceHttpPort" serviceAddress="${service.url}"
connectorConfig="HTTPRequestConfig" doc:name="Web Service Consumer">
I have fixed by adding a message-property-transformer just before the call to the ws-consumer:
<message-properties-transformer doc:name="Message Properties">
<add-message-property key="soap.header" value="${web.service.username.token}"/>
</message-properties-transformer>

Trying to retrieve TFS workitems using ClientService.asmx

I am trying to retrieve TFS workitems using ClientService.asmx using JavaScript and I am able to access the webservice, however when using the SOAP it gives me following error "TF51612: The query does not contain any groups or expressions.
Parameter name: queryXml"
Below is the code that I am using to access the Workitems:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<RequestHeader xmlns="http://schemas.microsoft.com/TeamFoundation/2005/06/WorkItemTracking/ClientServices/03">
<Id></Id>
</RequestHeader>
</soap:Header>
<soap:Body>
<QueryWorkitems xmlns="http://schemas.microsoft.com/TeamFoundation/2005/06/WorkItemTracking/ClientServices/03">
<psQuery>
<queryXml>
<Wiql>SELECT [System.Id], [System.WorkItemType], [System.Title], [System.AssignedTo], [System.State] FROM WorkItems WHERE [System.TeamProject] = #project AND [System.WorkItemType] <> '' AND [System.State] <> '' ORDER BY [System.Id] </Wiql>
</queryXml>
</psQuery>
</QueryWorkitems>
</soap:Body>
</soap:Envelope>
Please let me know what am I doing wrong.
Thanks
Your header SOAP must contais informations about your credential, because your query header's is empty so you are not authenticated
Add this with Soap Extension in your Web service, register in config file
After much pain I figured out how to do a proper request to this service. Here is my full request. Forgive me for the formatiing. I am apparently too dumb to figure out how to do a proper list.
Couple of notes...
*the RequestHeader Id field has to be in the format uuid:GUID
*The psQuery element is not actually in Wiql as other web sources have hinted. (Which is you are receiving the error)
*The FieldType for numeric fields is 288
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://schemas.microsoft.com/TeamFoundation/2005/06/WorkItemTracking/ClientServices/03">
<soapenv:Header>
<ns:RequestHeader>
<!--Optional:-->
<ns:Id>uuid:262c6910-8394-11e3-baa7-0800200c9a67</ns:Id>
</ns:RequestHeader>
</soapenv:Header>
<soapenv:Body>
<ns:QueryWorkitems>
<!--Optional:-->
<ns:psQuery>
<Group GroupOperator="And">
<Expression Column="System.TeamProject" FieldType="16" Operator="equals"><String>ProjectName</String></Expression>
<Expression Column="System.AssignedTo" FieldType="16" Operator="equals"><String>Daniel West</String></Expression>
<Expression Column="System.WorkItemType" FieldType="16" Operator="equals"><String>Anomaly</String></Expression>
<Expression Column="System.State" FieldType="16" Operator="equals"><String>Validate</String></Expression>
</Group>
</ns:psQuery>
<ns:sort>
<!--Zero or more repetitions:-->
<ns:QuerySortOrderEntry>
<!--Optional:-->
<ns:ColumnName>System.AssignedTo</ns:ColumnName>
<ns:Ascending>1</ns:Ascending>
</ns:QuerySortOrderEntry>
</ns:sort>
<ns:useMaster>1</ns:useMaster>
</ns:QueryWorkitems>
</soapenv:Body>
</soapenv:Envelope>

Problems with SOAP request

I am trying to integrate Siebel CRM with SAP system via...
The problem is : the SOAP request that siebel is generating is giving me an error while if I use SOAP UI to generate the SOAP request, it is working fine. Following are the error mesages and SOAP requests generated
Error from siebel SOAP request :
CX_ST_MATCH_ELEMENT:.System expected element 'PiCopyreference'".(SBL-EAI-04308)
Unsuccessful Siebel generated SOAP Request:-
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<CustomerCreatefromdata1 xmlns="urn:sap-com:document:sap:soap:functions:mc-style">
<PiCompanydata xmlns="urn:sap-com:document:sap:soap:functions:mc-style"></PiCompanydata>
<PiCopyreference xmlns="urn:sap-com:document:sap:soap:functions:mc-style">
<Salesorg xmlns="urn:sap-com:document:sap:soap:functions:mc-style">0001</Salesorg>
<DistrChan xmlns="urn:sap-com:document:sap:soap:functions:mc-style">01</DistrChan>
<Division xmlns="urn:sap-com:document:sap:soap:functions:mc-style">01</Division>
<RefCustmr xmlns="urn:sap-com:document:sap:soap:functions:mc-style">0000000011</RefCustmr>
</PiCopyreference>
<PiOptCompanydata xmlns="urn:sap-com:document:sap:soap:functions:mc-style"></PiOptCompanydata>
<PiOptPersonaldata xmlns="urn:sap-com:document:sap:soap:functions:mc-style">
<Transpzone xmlns="urn:sap-com:document:sap:soap:functions:mc-style">0000000001</Transpzone>
</PiOptPersonaldata>
<PiPersonaldata xmlns="urn:sap-com:document:sap:soap:functions:mc-style">
<TitleP xmlns="urn:sap-com:document:sap:soap:functions:mc-style">MR</TitleP>
<Firstname xmlns="urn:sap-com:document:sap:soap:functions:mc-style">FirstN</Firstname>
<Lastname xmlns="urn:sap-com:document:sap:soap:functions:mc-style">lastN</Lastname>
<City xmlns="urn:sap-com:document:sap:soap:functions:mc-style">SomeCity</City>
<PostlCod1 xmlns="urn:sap-com:document:sap:soap:functions:mc-style">7866</PostlCod1>
<Country xmlns="urn:sap-com:document:sap:soap:functions:mc-style">AT</Country>
<LanguP xmlns="urn:sap-com:document:sap:soap:functions:mc-style">E</LanguP>
<Currency xmlns="urn:sap-com:document:sap:soap:functions:mc-style">INR</Currency>
</PiPersonaldata>
</CustomerCreatefromdata1>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Successfull SOAP UI generated request :-
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap-com:document:sap:soap:functions:mc-style">
<soapenv:Header/>
<soapenv:Body>
<urn:CustomerCreatefromdata1>
<PiCompanydata/>
<PiCopyreference>
<Salesorg>0001</Salesorg>
<DistrChan>01</DistrChan>
<Division>01</Division>
<RefCustmr>0000000011</RefCustmr>
</PiCopyreference>
<PiOptCompanydata/>
<PiOptPersonaldata>
<Transpzone>0000000001</Transpzone>
</PiOptPersonaldata>
<PiPersonaldata>
<TitleP>MR</TitleP>
<Firstname>FirstN</Firstname>
<Lastname>lastN</Lastname>
<City>SomeCity</City>
<PostlCod1>7866</PostlCod1>
<Country>AT</Country>
<LanguP>E</LanguP>
<Currency>INR</Currency>
</PiPersonaldata>
</urn:CustomerCreatefromdata1>
</soapenv:Body>
</soapenv:Envelope>
Also in siebel i'm generating the SOAP request using workflows(no scripting involved).
Could be namespace issue. In the Siebel external IO, you could try inactivating all the user properties for namespace at ICField level.

How to resolve failure of JAX_WS web service invocation "MustUnderstand headers are not understood"?

I'm using SOAPUI tool to access JAX-WS web services deployed in Weblogic 10.3.2
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.pc3.polk.com/">
<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">
<wsu:Timestamp wsu:Id="Timestamp-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsu:Created>2010-12-03T21:10:43Z</wsu:Created>
<wsu:Expires>2010-12-03T21:44:03Z</wsu:Expires>
</wsu:Timestamp>
<wsu:Timestamp wsu:Id="Timestamp-60" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsu:Created>2010-12-03T20:10:39Z</wsu:Created>
<wsu:Expires>2010-12-03T20:43:59Z</wsu:Expires>
</wsu:Timestamp>
<wsse:UsernameToken wsu:Id="UsernameToken-59" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>rwerqre</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">ewrqwrwerqer</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">Nmw0ksmiOX+hkiSoWb2Rjg==</wsse:Nonce>
<wsu:Created>2010-12-03T20:10:39.649Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<ws:getMetadata/>
</soapenv:Body>
</soapenv:Envelope>
Response:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<SOAP-ENV:Fault xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode>SOAP-ENV:MustUnderstand</faultcode>
<faultstring>MustUnderstand headers:[{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security] are not understood</faultstring>
</SOAP-ENV:Fault>
</S:Body>
</S:Envelope>
You can configure a dummy SOAPHandler for {http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security that would mark this header as 'understood'.
Or you could change the SOAP request (on the caller side) to set mustUnderstand="0" in the security header.
Example security SOAP header with mustUnderstand="0":
<S:Header xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<wsse:Security S:mustUnderstand="0" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>USERNAME</wsse:Username>
<wsse:Password wsse:Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PASSWORD</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</S:Header>
After much research, this article solves this issue.
http://dwuysan.wordpress.com/2012/04/02/jax-ws-wsimport-and-the-error-mustunderstand-headers-not-understood/#comment-215
As per WS security specification:
The processor MUST, after decrypting the encrypted header block, process the decrypted header block according to the SOAP processing guidelines. The receiver MUST raise a fault if any content required to adequately process the header block remains encrypted or if the decrypted SOAP header is not understood and the value of the S12:mustUnderstand or S11:mustUnderstand attribute on the decrypted header block is true. Note that in order to comply with SOAP processing rules in this case, the processor must roll back any persistent effects of processing the security header, such as storing a received token.
So please check Configuration of CallbackHandlers.
Issue is with the Handlers. You need to add following in handler implementation
public Set<QName> getHeaders() {
final QName securityHeader = new QName(
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd",
"Security",
"wsse");
final HashSet headers = new HashSet();
headers.add(securityHeader);
return headers;
}
In SOAP UI Navigator,
right-click your project->Show Project View->WS-Security Configurations->Outgoing WS-Security Configurations
Uncheck Must Understand, and then send request.