cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP Adapter and plain HTTP

Werner_Magerl
Participant
0 Kudos

Hello,

what does the option

"Do not use SOAP envelope" on a SOAP SENDER adapter mean?

Does this mean, that only the payload from the soap message is sent to the integration server? (without the soap envelope)

Or does this mean, that I can send a XML message without SOAP envelope to the adapter from a HTTP client?

Which means, I can use the SOAP adapter like the standard PLAIN HTTP adapter, but I can implement a adapter module!

How knows more details on that?

Best regards

Werner Magerl

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

> what does the option

> "Do not use SOAP envelope" on a SOAP SENDER adapter

> mean?

When you check this option, the SOAP sender adapter does not extract the SOAP body from the SOAP message. The whole SOAP message including the SOAP header is considered as XI payload. That is useful if you need information from the SOAP header.

If you want to send non-SOAP messages you have to add the query string nosoap=true to the SOAP adapter URL:

"http://host:port/XISOAPAdapter/MessageServlet?channel=p:s:c&nosoap=true"

In this case the SOAP adapter works like the plain HTTP adapter.

If you want to use adapter modules for the sender SOAP adapter, you have to consider, that the XI message is created after your self-defined adapter module. So you cannot use standard modules like PayloadSwapBean.

Regards

Stefan

Werner_Magerl
Participant
0 Kudos

Hello Stefan,

thank you for your answer it was very helpful.

When I use the option nosoap=true and the setting "Do not use SOAP envelope" then it works.

So both things must be used together.

Is this correct?

What does this mean, that the XI message is created after the self-defined modules?

We just want to check the incoming XML message against a local XSD. If there is an error against the XSD, we do not want to receive the message, we want to send back a specific HTTP error code.

This is the reason, why we just want to send a plainHTTP message and not a SOAP Message.

In my opinion this should work?!

We do not want to use other modules.

Do you have experience on adapter modules for SOAP adapter?

Best Regards

Werner Magerl

stefan_grube
Active Contributor
0 Kudos

Hi Werner,

> When I use the option nosoap=true and the setting "Do

> not use SOAP envelope" then it works.

> So both things must be used together.

> Is this correct?

Yes. In your scenario you need both parameters.

> What does this mean, that the XI message is created

> after the self-defined modules?

When you write a module for sender file-adapter, you have to deal with an XI message, as the file adapter fisrt creates the XI message, then calls the customer module.

When you write a module for sender SOAP adapter, you have to deal with the incoming message, as the SOAP adapter first calls the customer module, then creates the XI message.

> We just want to check the incoming XML message

> against a local XSD. If there is an error against the

> XSD, we do not want to receive the message, we want

> to send back a specific HTTP error code.

> This is the reason, why we just want to send a

> plainHTTP message and not a SOAP Message.

> In my opinion this should work?!

> We do not want to use other modules.

Yes, that should work.

> Do you have experience on adapter modules for SOAP

> adapter?

No, I have no experience with adapter modules for sender SOAP adapter.

Regards

Stefan

Former Member
0 Kudos

I got this working here are a couple of tips...

The jar yon need for thes objects is called: com.sap.aii.messaging.runtime.jar

You need the following entry in your application-j2ee-engine.xml

	
<reference reference-type="hard">
		<reference-target provider-name="sap.com" target-type="library">com.sap.aii.messaging.runtime</reference-target>
	</reference>

The process method should look something like this:


public ModuleData process(
		ModuleContext moduleContext,
		ModuleData inputModuleData)
		throws ModuleException {

	ModuleData outputData = null;
		
	try {
			
	 	MessageContext principalData = (MessageContext) inputModuleData.getPrincipalData();
		Message message = (Message) principalData.getMessage();
		DefaultItem defaultItem = (DefaultItem) message.getBodyItems().nextElement();
	
		String data = defaultItem.getData();
...

Answers (3)

Answers (3)

Former Member
0 Kudos

can anyone send me a sample code for soap sender adapter module to pramodyadav443 at gmail com

Former Member
0 Kudos

Hello,

the tip of Douglas Culnane was very helpful.

I was able to read the message data.

But up to now I found no way to put the modified message

back via the return of the process method.

Has anyone some sample code ?

Best regards

Werner

Former Member
0 Kudos

Hi Werner,

Take a look at my blog,

/people/sap.user72/blog/2006/03/05/sendsimulate-xi-message-from-external-world

>> Do not use SOAP envelope

SOAP Adapter constructs the SOAP message and hence the payload must contain only the xmldata.

You cannot use plain Http receiver adapter as SOAP adapter since the adapter is not complex enough to send post request with multipart attachments (simulating a SOAP request).

Best regards,

Felix

Werner_Magerl
Participant
0 Kudos

Hello Felix,

sorry for the missunderstanding.

It is the other way round.

I want to use the SOAP adapter as HTTP adapter, because I need to implement an adapter module to solve my problem.

So the sender wants to send only a simple HTTP/XML message without SOAP envelope.

But I want to use the SOAP adapter instead of the PLAIN HTTP Adapter, because the HTTP adapter does not allow adapter modules.

So, if I use the setting "Do not use SOAP envelope" help me in this situation?

best regards

Werner Magerl