cancel
Showing results for 
Search instead for 
Did you mean: 

How to return SOAP Fault from MII?

Former Member
0 Kudos

Hello, there!

I'd like an MII 12 transaction to return a SOAP Fault response when it fails for some reason.

The closest thing I found to this is to terminate the transaction (using the "Terminate Transaction" action) with error.

But this will cause MII to return an HTML page containing the error message, which is not satisfactory at all. It even causes the client to fail, since it is expecting a SOAP response.

Does anyone have any clue about this?

Thanks in advance!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

The client will get a 500 error, with the error data available in the HTML content. Using the 500 error as the notification that something went wrong is probably the easiest way at present.

You could also create a "simulated" SOAP call using the Runner servlet and HTTP post, along with input and output XML documents that use a SOAP envelope/structure. You could then add a SOAP fault to the returned XML from within your transaction logic. It's not easy, but it can be done. The transaction itself is easy, but creating the WSDL is a bit more work, since you need to override the SOAP URL in the WSDL to point to Runner instead of SOAPRunner, and to include the InputParameter parameter in the URL to tell MII to map the "posted" XML (SOAP Input message) to a specific transaction input parameter.

Former Member
0 Kudos

Hi, Rick!

Thanks a lot for your help.

Would this solution require modifications on the client, the one that is calling MII transaction via WS?

How would I map the InputParam input parameter to the request? I guess I would have to use a query string, but how exactly?

What about the output parameter?

Can you provide me with an example for this WSDL?

Anyway, I don't understand why MII responds to a SOAP request with an HTML page...

Thanks a lot!