{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Edge/API Management /
avatar image
0
Question by vinay · Dec 15, 2015 at 12:42 AM · 1.3k Views edge

How to Extract SOAP Action from request headers

How to Extract SOAP Action from request headers?

-Vinay

Comment
Add comment Show 1
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image vinay · Dec 15, 2015 at 03:30 PM 0
Link

What is the request.header parameter to be used to extract soap header from incoming request?

Tried request.header.SOAPAction but no luck.

Please suggest.

Close

1 Answer

  • Sort: 
avatar image
0
Best Answer

Answer by Vikaas · Dec 15, 2015 at 03:59 PM

Using Javascript is could extract the request header - 'SOAPAction' successfully. The key is to check if extract function matches header name (case sensitive)

@vinay poreddy How are you trying to extract it?

var soapAction = context.getVariable('request.header.SOAPAction');

Trace screenshot:


soapaction.png (9.0 kB)
Comment
Add comment Show 2 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image vinay · Dec 17, 2015 at 09:28 PM 0
Link

Above JS works.Thanks for the information.

Question:

Have you tried using extract variable and assign?

avatar image Vikaas · Dec 18, 2015 at 09:44 AM 0
Link

Yes,

Here is a sample for Extract Policy,

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ExtractVariables async="false" continueOnError="false" enabled="true" name="Extract-Variables-1">
    <DisplayName>Extract Variables 1</DisplayName>
    <Properties/>
    <Header name="SOAPAction">
      <Pattern ignoreCase="false">{SOAPHeaderValue}</Pattern>
  	</Header>    
    <IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>    
    <Source clearPayload="false">request</Source>
    <VariablePrefix>apigee</VariablePrefix>    
</ExtractVariables>

Now you can access the SOAP Header value using {VariablePrefix}.{Pattern}. i.e apigee.SOAPHeaderValue

If you are using JS,

var soapAction = context.getVariable('apigee.SOAPHeaderValue');

Sample Assign Message Policy to copy value from apigee.SOAPHeaderValue to another variable - flow.soap.header

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AssignMessage async="false" continueOnError="false" enabled="true" name="Assign-Message-1">
    <DisplayName>Assign Message 1</DisplayName>
    <Properties/>     
	<AssignVariable>
    		<Name>flow.soap.header</Name>
    		<Ref>apigee.SOAPHeader</Ref>
    		<Value>NULL</Value>
	</AssignVariable>
    <IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
    <AssignTo createNew="false" transport="http" type="request"/>
</AssignMessage>



Hope this helps!!

Follow this Question

Answers Answers and Comments

34 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

SSL access for Apigee Edge 2 Answers

Error in 3-legged OAuth 5 Answers

Why am I not able to view/delete the target server name with a colon at the end ? 1 Answer

How do I configure Proxy for the backend service with OAuth 1.0? 3 Answers

Proxy chaining and Edge Cloud plan quota 2 Answers

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges