on 02-02-2010 3:14 PM
Hello,
by proyect needs we need to add into SOAP header some dynamic information
(Web Services calls to target systems from PI 7.1). This information is
needed in target application for validating permissions of the web
services calls.
The tags are
<soap:Header>
<CarHeader xmlns="http://xxxxx.xxxxxxxx.xxx.org/">
<TicketCar>xxxxxxxxxxxxxxxxxxxxxx......</TicketCar>
</CarHeader>
</soap:Header>
TicketCar's value (xxxxxx....) will be different in each call.
We think that this is not possible with standar or Axis PI SOAP receiverchannel and a solution could be making a Abap mapping for composing the
SOAP call with this tags and values, and in the comunication channel
check the parameter "Do not use SOAP Envelope".
It's rigth? Is there any other solution for doing it?
An example of a call will be:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<CarHeader xmlns="http://xxxxx.xxxxxxxx.xxx.org/">
<TicketCar>C4A8A61D86C56DC27......</TicketCar>
</CarHeader>
</soap:Header>
<soap:Body>
<E000xx xmlns="http://xxxxx.xxxxxxxx.xxx.org/">
<_request>
<NumeroExpedienteAdministrativo>xxx</NumeroExpedienteAdministrativo>
<CodigoDocumentoInterno>xxx</CodigoDocumentoInterno>
<Status>xx</Status>
<NumeroExpedienteContable>xxx</NumeroExpedienteContable>
</_request>
</E000xx>
</soap:Body>
</soap:Envelope>
Any idea will be welcome
Edited by: Ramon Coma Alcantara on Feb 2, 2010 4:15 PM
Hi Ramon,
> TicketCar's value (xxxxxx....) will be different in each call.
>
> We think that this is not possible with standar or Axis PI SOAP receiverchannel and a solution could be making a Abap mapping for composing the
> SOAP call with this tags and values, and in the comunication channel check the parameter "Do not use SOAP Envelope".
>
> It's rigth? Is there any other solution for doing it?
It's not right. See the axis adapter faq note. There are some examples for adding an arbitrary soap header with values passed along the message (like in the adapter specific message properties). In this case, you can still use all the soap processing features like standard fault handling, additional ws-* features, etc.
Regards, Yza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Yza,
I'm not sure it's possible to do this header tag addition with the adapter specific message properties. SAP documentation says, if you want add additional header tags in a SOAP request you must do it creating the entire SOAP request in a mapping. Perhaps consulted documentation is old. By other hand, value of header can't be send in XML request, only in SOAP header and I understand if I want get the value of the tag this value must be in XML payload. It's right? Have you some example? I would be grateful.
Regards.
Hi,
I had the same requirement, and I created a AdapterModule that was called just before the SOAP adapter which was in `Do not use envolope` mode. You can use the same approach and create the SOAP envelope + header and pass it to the SOAP adapter to make the call and this will avoid the performance loss you would face in Java mapping as the ABAP stack would have to call the Java stack in the middle of routing each time, and again at the end of pipeline steps for the final call.
You can use the SAAJ API for constructing the message, just search for some Java blogs on the net on how to do so. Also, adapter specific properties in the SOAP adapter will not be able to help you in any way in this case.
Regards,
Gokhan
Hi Ramon,
The axis adapter comes with a convenient header insertion handler where you can insert an arbitrary header using a template.
For example, you can define a template like this in the module configuration.
<x:header xmlns:x="urn:x"><me>i say </me><you>you say </you></x:header> where , , ... are variable place holders.
and you associate these variables with any context value available in the message.
For example, when you pass Hello and Bye for these variables, you soap message will get the header:
<x:header xmlns:x="urn:x"><me>i say Hello</me><you>you say Bye</you></x:header>
You can look at the examples described in Note 1039369 Axis Adapter FAQ.
As I said before, the mileage you can go with the do-not-use-envelope mode is very limited. But if you are happy with it, why not.
Best regards, Yza
HI,
I need to pass one field from the message to the soap header. I used the dynamic configuration to copy the field in mapping.. How can i get this one from dynamic config to Soap header. I have gone through axis faq. Can any one point me in the right direction.
1. need to know how to use java:com.sap.aii.axis.xi.XI30DynamicConfigurationHandler to read from Dynamic Config
2. Need to know how to use java:com.sap.aii.axis.soap.HeaderInsertionHandler and pass the value from the above step
Thank you
Moni
Ramon
I have a similar requirement and was investigating the various options. I found a couple of options - Explicit and implicit headers in
the WSDL. Which option did you finally choose ? Can you please post a sample WSDL ?
By default the adapter populates a default soap header tag in the envelope. If you include it in the WSDL and populate it, does it recognize that the tag exists and not create an invalid XML ? I am assuming it does as you mentioned that your solution works.
Appreciate your help.
Thanks
Sridhar
Hi Ramon,
I have almost same requirement, i want to use message mapping and need to modify soap envolpe before soap call.
Please provide me sample java code or some step by step kind of stuff.
Thanks,
Sandip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
finally is solved with a Java mapping.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.