How to invoke soap wsdl request for magento2 in SOAPUI.

I have created a soap wsdl request in SOAPUI using my URL
When i invoke request its giving error Consumer is not authorized to access %resources. To overcome this i have found another request which is giving token.

But how to send token in customerrepository request.

Customer Save Request
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:def=""> <soap:Header/> <soap:Body> <def:customerCustomerRepositoryV1SaveRequest> <customer>
<email>[email protected]</email> <firstname>prasad</firstname> <lastname>p</lastname> </customer> </def:customerCustomerRepositoryV1SaveRequest> </soap:Body> </soap:Envelope>

Customer Save Response
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:m="http%3A%2F%2F192.168.0.1%2FM2EE%2Fsoap%2Fdefault%3Fservices%3DcustomerCustomerRepositoryV1%26wsdl%3D1"> <env:Body> <env:Fault> <env:Code> <env:Value>env:Sender</env:Value> </env:Code> <env:Reason> <env:Text xml:lang="en">Consumer is not authorized to access %resources</env:Text> </env:Reason> <env:Detail> <m:GenericFault> <m:Parameters> <m:GenericFaultParameter> <m:key>resources</m:key> <m:value>Magento_Customer::manage, self</m:value> </m:GenericFaultParameter> </m:Parameters> </m:GenericFault> </env:Detail> </env:Fault> </env:Body> </env:Envelope>

1 Answer 1


To send a token, that you get from , you need to add the HTTP authorization header e.g. "Authorization: Bearer <put your token here>" "" should be replaced with your token.

  • Can you please specify where should i declare "Authorization: Bearer <your token>" in my xml request Commented Feb 5, 2016 at 10:40
  • How do you send your request? What kind of utility do you use? Commented Feb 5, 2016 at 10:42
  • SOAPUI version 5.2.1 Commented Feb 5, 2016 at 10:46
  • At the bottom of the request window in XML mode you should see "Headers (0)". Then proceed to that tab and add a custom header with the name "Authorization" and the value "Bearer <put your token>". "<put your token>" should be replaced with a token. Commented Feb 5, 2016 at 10:49
  • You are awesome, thank you. can you please let me know how should i add this header if i'm sending from any other utility like third party applications? Commented Feb 5, 2016 at 10:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.