cancel
Showing results for 
Search instead for 
Did you mean: 

Create SOAP Fault Message

udo_martens
Active Contributor
0 Kudos

Hi,

my scenario is SOAP -> NW BPM (synchronous).

The sender requires in case of errors a SOAP fault message, he provided a corresponding wsdl/xsd. As far as i see it is not possible to do that with PO standard because i can put only one response message type into an outbound interface and the Fault Message in an PI interface has actually nothing to do with a SOAP fault message (PI has always a PI standard fault message type, the SOAP fault message is inside the envelope). Please correct me if i m wrong.

So does anybody know a more elegant way than to use "no SOAP envelope" in the channel and create an ugly xslt mapping to create the right envelope in any case?

Thanks for your help,

Udo

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Udo

I don't think we have any other better options. The easiest design will be, check the 'do not use soap envelope' option and write an simple java mapping to populate the soap fault message in PI.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Udo,

is it possible in your scenario to throw an exception which is not caught in PO into some predefined Fault type? Enterprise Services do that, for example, and the result is a nice SOAPFault.

Regards,

Jörg

udo_martens
Active Contributor
0 Kudos

Hi Jörg,

thanks for the hint

I did not get clue, unfortunately. The SOAP sender provided a wsdl containing several messages, one of them for the error case having some fields for the error reason. The sender wants to get a SOAP fault message in that case. How could i  force PO to send this SOAP fault message?

/Udo

Former Member
0 Kudos

Hi Udo,

I guess that depends on where you have to throw that exception. I assume that in case of an "unexpected" exception the PO framework will create that SOAP Fault for you with entries you don't have under direct control (it will take some environment variables to populate the fault). I guess now that the wsdl defines the detail section of the SOAP Fault? In this case, maybe you can enter some coding before throwing the exception. There is a SOAPFault class in Java, maybe that can be used. Or you throw a normal exception and pass a string in XML format as error message (which the framework hopefully puts into the details section). This string would then be in the format the wsdl expects.

I haven't tried this special scenario, but I think it is easy to try and might work.

Regards,

Jörg

iaki_vila
Active Contributor
0 Kudos

Hi Udo,

Perhaps, with a  module development to do the "ugly" transformations and you will have the ESR without extras mappings. What do you think?, i think you would like a standard way to avoid further recoding in upgrades, aren't you?

Regards.