cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP Header fields in SOAP adapter

Former Member
0 Kudos

Hi All,

I have a scenario IDoc to SOAP adapter. In which my receiver given the details as

URL : https://b2b.ecsc.us.gxs.com/invoke/GXSGateway:receiveCTE

Header Name: Header Value

Ent-sender xxxx

Ent-receiver yyyyy

Ent-APRF zzzzz

Ent-filename (not sure what data need to give)

1. I request you to let me know where I need to give these headername and hader values in soap adapter.

2. my client require file as an attachment. Please let me know how I need to send the payload as an file and where the name need to be given in the header name (Ent-filename).

Currently I used MessageTransformBean to conver my XML to text structure(flatfile structure).

Please let me know if any more details required

Regards,

Dhill

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In adaptter configuration of soap adapter

Conversion Parameters ->

Keep Headers -> If the header of the XI message is to be included in the Web service message, set the indicator.

Use Query String -> Use Query String

http://help.sap.com/saphelp_nw04/helpdata/en/29/5bd93f130f9215e10000000a155106/content.htm

<b>Cheers,

*RAJ*

*REWARD POINTS IF FOUND USEFULL*</b>

Former Member
0 Kudos

Hi Deviprasad and Raj,

Thank you very much, I have configured as specified. I can see successful status in communication channel monitoring and messagingSystem. But my vendor is saying he didn't find any hit in his server.

Can anybody tell me where can I find in XI whether the header details are passing to the target URL.

Regards,

Dhill.

Former Member
0 Kudos

Hi,

Is the URL right >? When the outbound message is sent from XI then it identify's the target webservice through the URL.

Check Message Monitoring once to be sure. In component monitoring wht is the status of SOAP adapter >?

<b>Cheers,

*RAJ*

Former Member
0 Kudos

Hi Raj,

I hope the URL is right because check with vendor and he confirmed it.

In Message Monitoring it shows success and in component monitoring the status of the SOAP adapter is RED (but audit trial shows no error).

Regards,

Dhil.

Former Member
0 Kudos

Status is red .. audit trial no error....We have to drill down to find where exactly itz getting stuck

Try to send a message once again n and again check the stat of soap adapter.

Recheck the adapter config again. Can you post them....

<b>Cheers,

*RAJ*

*REWARD POINTS IF FOUND USEFULL*</b>

Former Member
0 Kudos

Yes drill down till the end but all the step shows success...and message sent so many times but got the same error.

The adapter configuration is

target url : https://b2b.ecsc.us.gxs.com/invoke/GXSGateway:receiveCTE

in Adapter-specific Message Attributes

checked use adapter-specific Message Attribues and Variable Transport Binding

then given the values as

Variable Header (XHeadername1) : xxxx

Variable Header (XHeadername2) : yyyyy

Variable Header (XHeadername3) : zzzzz

In conversion parameters

Checked do not use SOAP Envelope, Keep Header, Use Encoded Headers and Use Query String.

But client has given the Header Name and Header values

Header Name: Header Value

Ent-sender : xxxx

Ent-receiver: yyyyy

Ent-APRF : zzzzz

Ent-filename : client_file_name

Let me know if any details required.

Regards,

Dhill

stefan_grube
Active Contributor
0 Kudos

In variable header you give the header names. The values have to be provided in ASMA. But you can have only 3 values, as you need 4 different values it is not feasiblae.

The other parameters:

do not use SOAP Envelope, Keep Header, Use Encoded Headers and Use Query String.

Uncheck all of them.

Regards

Stefan

Former Member
0 Kudos

Was out for lunch break..

Juz Rechecking

Transport Protocol : HTTP

Message Protocol: Soap 1.1

Adapter Engine -> Adapter Engine on the Integration Server

Connection Parameters

Target URL - > https://b2b.ecsc.us.gxs.com/invoke/GXSGateway:receiveCTE

Sure about no sever authentication required and they are not using any HTTP proxy for webservice >????

Conversion Parameters

Do Not Use SOAP Envelope -> Unchecked

Keep Headers -> Checked.

Keep Attachments -> Unchecked

Use Encoded Headers -> Unchecked

Use Query String -> not so sure might be Unchecked

<b>Authentication Keys</b>

If authentication is required for the receiver system, you can enter a password and a confirmation for each key value. This means that you do not need to write passwords in the enhanced message header.

If you want to specify or display authentication keys, select View Authorization Keys.

You can enter and confirm passwords for each authentication key value (TAuthKey or TproyxAuthKey).

Try once sending the message with Adapter-Specific Message Attributes

Unchecked. See if there is a hit.I knw itz not req but juz testing.

Yeah adapter stat must be active.

Last thing need to go through the whole scenario.

<b>Cheers,

*RAJ*

*REWARD POINTS IF FOUND USEFULL*</b>

Former Member
0 Kudos

Hi Stefan,

Thank you very much, I have given as you mentioned and unchecked all the option in the <b>Conversion Parameters</b>. And also the 4th value is optional.

>>>The values have to be provided in ASMA

Can you please tell me what is ment by ASMA and how I have to specify the values. I hope If I did this my problem is solved.

Regards,

Dhill

stefan_grube
Active Contributor
0 Kudos

Check the online help:

http://help.sap.com/saphelp_nw04/helpdata/en/29/5bd93f130f9215e10000000a155106/frameset.htm

Look for "Adapter-Specific Message Attributes", especially XHeaderName1, XHeaderName2, XHeaderName3.

Regards

Stefan

Former Member
0 Kudos

Juz for clarification if *Use Encoded Headers -> unchecked does it make any diff in the scenario if yes then how ?

<b>Cheers,

*RAJ*

Former Member
0 Kudos

Hi Stefan,

I am confused.... I have gone through the link and it says as

<i>If you want to transfer header fields, set the relevant indicator for Variable Header. The technical names for the fields are XHeaderName1, XHeaderName2, XHeaderName3. The parameters are embedded in the HTTP request under the names you enter here.

The attribute namespace for the adapter is http://sap.com/xi/XI/System/SOAP.</i>;

But as per our earlier discussion we have given the header names in ASMA which is avaliable in Communication channel

In Adapter-Specific Message Attribtues in Communication channel I could see 2 checkbox and three listbox

Two checkbox

1. Use Adapter-Specific Message Attributes -> Checked

2. Variable Transport Binding -> Checked

Three List Box

Variable Header (XHeadername1) : HeaderName1

Variable Header (XHeadername2) : HeaderName2

Variable Header (XHeadername3) : HeaderName3

Please let me know in which place we need to give the Headervalues. Is anything do we need to do in Integration Repository

Regards,

Senthil.

Former Member
0 Kudos

Hi Raj,

Thank you very for your detailed information. I used the conversion parameters as mentioned by use.

<b>Conversion Parameters

Do Not Use SOAP Envelope -> Unchecked

Keep Headers -> Checked.

Keep Attachments -> Unchecked

Use Encoded Headers -> Unchecked

Use Query String -> not so sure might be Unchecked</b>

And currently I have given the headernames as below as mentioned by Stefan

Variable Header (XHeadername1) : HeaderName1

Variable Header (XHeadername2) : HeaderName2

Variable Header (XHeadername3) : HeaderName3

I got the error in communicatio channel as:

SOAP: call failed: com.sap.aii.messaging.mo.MalformedMessageException: java.lang.NullPointerException; nested exception caused by: com.sap.aii.messaging.util.XMLScanException: java.lang.NullPointerException; nested exception caused by: com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 34, 30, 33(:main:, row:1, col:3)(:main:, row=1, col=3) -> com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 34, 30, 33(:main:, row:1, col:3)

Regards,

Senthil.

stefan_grube
Active Contributor
0 Kudos

You should put the values like this:

Variable Header (XHeadername1) : Ent-sender

Variable Header (XHeadername2) : Ent-receiver

Variable Header (XHeadername3) : Ent-APRF

For the ASMA

http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm

you provide:

key = “http://sap.com/xi/XI/System/SOAP”, “XHeaderName1”

value = xxxx

and so on

Former Member
0 Kudos

Hi Stefan,

I have given as

Variable Header (XHeadername1) : Ent-sender

Variable Header (XHeadername2) : Ent-receiver

Variable Header (XHeadername3) : Ent-APRF

and below in Authentication Keys I have given as

Key “http://sap.com/xi/XI/System/SOAP”, “XHeaderName1”

Password xxxx

Key “http://sap.com/xi/XI/System/SOAP”, “XHeaderName2”

Password yyyyy

Key “http://sap.com/xi/XI/System/SOAP”, “XHeaderName3”

Password zzzzz

Please let me know is this correct.

Thank you very much,

Regards,

Dhill

Former Member
0 Kudos

Give it a shot dude

stefan_grube
Active Contributor
0 Kudos

Not in Authentication Keys.

You have to provide the ASMA during mapping.

Former Member
0 Kudos

Hi Stefan and Raj,

It was the same status I suppose because the status in communication channel Monitoring is RED and it says "call completed" and if I go to audit log and see.. all the steps are success only.

Note: If I checked DO NOT USE SOAP ENVELOPE in Conversion Parameters I am getting any eror and all other are unchecked. If I uncheck then I am getting the error as mentioned above.

Can you please tell me where I can see the Target URL details and all the Header details in XI because I am not able to find anything in Communication channel monitoring and also not in MessagingSystem. It there any tool for it. Would like to know whether the header details is passing or not.

Regards,

Dhill

stefan_grube
Active Contributor
0 Kudos

We are dicussing different topic the same time.

The mentioned error as nathing to do with the header fields or the parameters you choose or not. It comes from this:

"Currently I used MessageTransformBean to conver my XML to text structure(flatfile structure)."

A SOAP request must be in XML format. You cannot use the SOAP adapter with a flat structure.

As in your original thread your want to have SOAP with attachments, there is way more to do to achieve this. First at all you have to provide an XI message with attachment.

The main payload should be a valid XML, the attachment then is your flat file.

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

Sorry for the confusion and also I haven't seen you previous message before sending my comments... I creating now the UDF as given in the link.

My Actually scenario is sending a flat file(required format through the soap adapter

>>A SOAP request must be in XML format. You cannot use the SOAP adapter with a flat structure.

I could see the required output throught the tool TCPGW. So currently the XML got converted to flat structure. - so we plan to send this converted message with the three header details. - Please correct me if I am wrong and also not sure this is feasible or not.

Regards,

Dhill

Former Member
0 Kudos

Hi Stefan,

Just to address the header issues I have cretead the UDF with the code

DynamicConfiguration conf = (DynamicConfiguration) container

.getTransformationParameters()

.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key1 = DynamicConfigurationKey.create(

“http://sap.com/xi/XI/System/SOAP”,

“XHeaderName1”);

DynamicConfigurationKey key2 = DynamicConfigurationKey.create(

“http://sap.com/xi/XI/System/SOAP”,

“XHeaderName2”);

DynamicConfigurationKey key3 = DynamicConfigurationKey.create(

“http://sap.com/xi/XI/System/SOAP”,

“XHeaderName3”);

conf.put(key1, "xxxx");

conf.put(key2, "yyyyy");

conf.put(key3, "zzzzz");

and then I have taken a custom field from target structure and mapping the constant in between called the UDF.

Please let me know is this correct.

Regards,

Dhill

henrique_pinto
Active Contributor
0 Kudos

Dhil,

that seems about right.

As per your requirement of sending the flat file in a soap message, you could try to create a dummy xml message just to wrap the flat file, like this:


<Message>
  <data>
  ...YOUR FLAT FILE HERE...
  </data>
</Message>

This way, you should be able to send it through a soap message with no problems.

However, the receiver system needs to be able to catch the flat file from within the wrapper XML message (no huge efforts necessary, though).

Regards,

Henrique.

Former Member
0 Kudos

Hi Stefan,

Thank you very very much... I could see the header details in communication channel as below

- <SAP:DynamicConfiguration SOAP:mustUnderstand="1">

<SAP:Record namespace="http://sap.com/xi/XI/System/SOAP" name="XHeaderName2">xxxx</SAP:Record>

<SAP:Record namespace="http://sap.com/xi/XI/System/SOAP" name="XHeaderName1">yyyyy</SAP:Record>

<SAP:Record namespace="http://sap.com/xi/XI/System/SOAP" name="XHeaderName3">zzzzz</SAP:Record>

</SAP:DynamicConfiguration>

not I will concentrate on soap with attachment. Need your support on this also.

<b>Raj</b> thanks for you suppport also.

Regards,

Senthil.

Former Member
0 Kudos

Hi Henrique,

Header problem is solved. And with regards to flat file as I mentioned earlier now readily I have the payload converted into flat file structure. So just need to know how this will actually go from soap adapter.

my client required file as an attachment.

>>However, the receiver system needs to be able to catch the flat file from within the wrapper XML message (no huge efforts necessary, though).

As per your suggestion please give some more details on wrapper XML message which would help me to suggest the same to my client.

Thank you,

Regards,

Dhill.

henrique_pinto
Active Contributor
0 Kudos

Dhil,

the message will be sent as I've shown before:


<Message>
  <data>
  ...YOUR FLAT FILE HERE...
  </data>
</Message>

The receiver side needs to be able to parse this message and remove the flat file.

If they use some EAI tool (like XI, for instance) that would be done in a simple mapping (XSLT mapping, for example).

If you require the flat file as attachment, then you need extra development to achieve that.

Regards,

Henrique.

Former Member
0 Kudos

Hi Henrique,

Thank you, currently I proceed with method sending the converted format as a message and updated the same to my client. Now he asked me that

<b><i>can you check whether you have got the HTTP response code 200 OK. This is a standard response if the HTTP connection to any URL is established</i></b>

Please tell me where we can check this in XI now in communication channel the status in red only but there is no errors in audit log and it says "call completed".

Regards,

Dhill.

Former Member
0 Kudos

Hi All,

I have check the OSS note 856597 where it clearly told that it expecting for HTTP 200 and if it got the connectivity is success like that.

I have checked in communication channel and also in MessagingSystem where there is no error at all. But my client says he is not able to see the files(xml messages).

Can anybody help me out is there any other way to confirm to my client that XI got the <b>HTTP 200 responce</b>

Regards,

Dhill

Former Member
0 Kudos

Hi Stefan,

My header issue is solved do have any comments on the current issue.

Thank you,

Dhill

henrique_pinto
Active Contributor
0 Kudos

You can either check the communication channel monitoring or the audit log of the message, in message monitoring (though you can directly acess the audit log for a message through communication channel also).

Regards,

Henrique.

Answers (2)

Answers (2)

Former Member
0 Kudos

Flat file issue pending

deviprasad_pothireddy
Active Participant
0 Kudos

To process adapter attributes in the message header of the XI message, select Use Adapter-Specific Message Attributes and Variable Transport Binding.

http://help.sap.com/saphelp_nw04/helpdata/en/29/5bd93f130f9215e10000000a155106/content.htm

Regards,

Deviprasad

Former Member
0 Kudos

Hi Deviprasad,

Thanks I hope my question is not clear. Actually I need to give both Header names and Header values. And through dapter-Specific Message Attributes and Variable Transport Binding I hope we can only our Header names.

Can anybody tell me where I will giving ghe header values and If I need to give with query string please tell me how I need to specify the target url.

Regards,

Dhill