cancel
Showing results for 
Search instead for 
Did you mean: 

sender HTTP and validation

Werner_Magerl
Participant
0 Kudos

Hallo,

we have a HTTP sender to allow partners to send HTTP/XML message. THese messages are converted to IDOCs and are posted to the R/3 system.

HTTP -> IDOC scencario

Until now we have no validation of the incomming XML message.

Goal is not to accept the wrong XML message and to send back a HTTP error code to the sender.

Is it possible to have an adapter module on the planHTTP adapter? As I understood this is not possible???!!!

Is it possible to use the SOAPsender Adapter with the option "No Soap"? I still want to receive HTTP/XML message and I do not want to force my partners to call a webservice.

Can I implement a adapter module in the SOAPsender to return a specific HTTP code if the XML validation fails?

Can this be done only in SYNCHRON mode?

The problem is, the the IDOC to SAP is only asynchron, so do I have to implement a BPM with SYNCH-ASYNCH bridge then?

I know, a lot of questions but all because there is no valiation on XI at the moment.

Best regards

Werner Magerl

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Irrespective of where you are doing the validation, as Idoc is an Asynch always, wouldnt you need a BPM with a Synch - Asynch bridge. Even if the XML message is valid and Idoc is sent succesfully, are you not going to send some response back to the HTTP? Wouldnt you be using a BPM in this case too?

There are 2 options from what I can understand of the requirement,

1. Either make an Asynch call and avoid a BPM altogether , but not propogate back any success or error message.

2. Make a synch call and use a BPM, and propgate either a success or failure message.

Regards,

Bhavesh

Werner_Magerl
Participant
0 Kudos

Hi,

> Irrespective of where you are doing the validation,

> as Idoc is an Asynch always, wouldnt you need a BPM

> with a Synch - Asynch bridge.

Yes, this is clear and I have implemented this BPM to cover this SYNC-ASYNC problem. I ecpected here, also, that I can send back a HTTP error code, but the only thing which is sent back is HTTP-200 for ok and HTTP-500 (time out).....

> Even if the XML message

> is valid and Idoc is sent succesfully, are you not

> going to send some response back to the HTTP? Wouldnt

> you be using a BPM in this case too?

this is the reason, why I try to do this in an adapter module. Because I think, then the HTTP connection is still open and I can send each HTTP code I want before the message arrives in the integration server or in a BPM

> There are 2 options from what I can understand of the

> requirement,

>

> 1. Either make an Asynch call and avoid a BPM

> altogether , but not propogate back any success or

> error message.

no, we wnat to show an error

> 2. Make a synch call and use a BPM, and propgate

> either a success or failure message.

this is also a way we are working on, but here we have the problem of defining the answer message interfaces.

The incomming message is defined by a industry specific XSD and I was not able to enhance this message interface to be SYNCHRON and with ANSWER message.

But if adapter mdouel is not possible we will work on this again.

reagrds

Werner

>

> Regards,

> Bhavesh

Answers (2)

Answers (2)

bhavesh_kantilal
Active Contributor
0 Kudos

Werner,

><i>Goal is not to accept the wrong XML message and to send back a HTTP error code to the sender.</i>

Can you tell us what you mean by Wrong XML message?

If you are using a graphical mapping and the source XML doesnot match the source strucutre, then you will have a Runtime error in XI with a mapping exception. Graphical Mapping does validate your Source XML against thew actual input.

Regards,

Bhavesh

Werner_Magerl
Participant
0 Kudos

Hello

> ><i>Goal is not to accept the wrong XML message and

> to send back a HTTP error code to the sender.</i>

>

> Can you tell us what you mean by Wrong XML message?

e.g. mandatory tags are missing, wrong values in tags,

so all things which can be checks with XSD validation

> If you are using a graphical mapping and the source

> XML doesnot match the source strucutre, then you will

> have a Runtime error in XI with a mapping exception.

> Graphical Mapping does validate your Source XML

> against thew actual input.

yes, this is correct and I use this,

but then this error is NOT sent back to the sender.

We have sent back the HTTP-200 and this is what we want to change.

If the message is not valid against a defined XSD the sender MUST be informed by a specified HTTP-4xx error code (and if possible with the error itself)

So the problem itself is not how to do the validation,

the question is more WHERE can I do the validation to show the result to the sender.

Best regards

Werner

former_member187339
Active Contributor
0 Kudos

Hi,

>>So the problem itself is not how to do the validation,

the question is more WHERE can I do the validation to show the result to the sender.

Try to validate in sender system itself. Else in XI you can validate as told by bhavesh and send the error thru a receiver http adapter to the same system.

Regards

Suraj

Werner_Magerl
Participant
0 Kudos

Hi,

> >>So the problem itself is not how to do the

> validation,

> the question is more WHERE can I do the validation to

> show the result to the sender.

>

> Try to validate in sender system itself. Else in XI

> you can validate as told by bhavesh and send the

> error thru a receiver http adapter to the same

> system.

Thats the problem, normals the sender should do the validation, but we still receive invalid XML messages.

It is no problem to send an answer back by a HTTP receiver, but we do NOT want to accept the sender message instead.

Because this is the most efficient way to inform the sender that there is something wrong.

regards

Werner

>

> Regards

> Suraj

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>>Is it possible to have an adapter module on the planHTTP adapter? As I understood this is not possible???!!!

it is not as it's an abap service

so you can just copy the service and create

your own validation in it

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Werner_Magerl
Participant
0 Kudos

Hello Michal,

what do you mean with

"copy the service and creat your own valitation"

Which service can I copy?

best regards

Werner

MichalKrawczyk
Active Contributor
0 Kudos

hi,

HTTP service is a standard internet service

on abap stack which you can copy like any other program

Regards,

michal

Werner_Magerl
Participant
0 Kudos

Hi,

do you have some documentation how I can do this,

and how I can implement some new functionality??

regards

Werner

> hi,

>

> HTTP service is a standard internet service

> on abap stack which you can copy like any other

> program

>

> Regards,

> michal

Werner_Magerl
Participant
0 Kudos

Hi Michael,

do you have some documentation how I can do this,

and how I can implement some new functionality??

regards

Werner

>

> > hi,

> >

> > HTTP service is a standard internet service

> > on abap stack which you can copy like any other

> > program

> >

> > Regards,

> > michal