import wsdl in webmethods : SOAP-FAULT

Hello,

IS : 6.1 SP1
Protocol : SOAP MSG

When i import the wsdl (see the attachments) in webmethods, i see in the document GenergyTTHandlingOutput “SOAP-FAULT” (see the attachments). But i can’t see the reference in the WSDL.

Also the problem is that “SOAP-FAULT” is not namespace qualified : when i used addBodyEntry in order to edit my soapResponse with no value in the “dx:control”, i saw this error : com.wm.app.b2b.server.ServiceException: [ISS.0088.9142] Invalid Body Entry. SOAP Body Entries must have a namespace name.

Can you explain me why i have “SOAP-FAULT” in the document GenergyTTHAndlingOutput?

How can use i it whitout prefix and namespace?

EAIGenergyTTHandling V1T5.wsdl (37.8 KB)
GenergyTTHandlingOutput.JPG

Please check these threads below,covers mostly how to handle SOAP-MSG,namespace issues etc…

http://wmusers.com/forum/showthread.php?t=9277
http://wmusers.com/forum/showthread.php?t=12526
http://wmusers.com/forum/showthread.php?t=12822

HTH,
RMG

The Soap specification requires that web services return soap faults for most types of exceptions. Soap faults can be described in WSDL definitions, but often are not. The IS web service connector wizard generates a flow service that will attempt to populate the soap fault document type if the soapStatus indicates that a fault was returned.

Not sure why you are attempting to populate a soap fault unless you have created your own soap processor and are customizing the fault that you want to be returned.

Mark

thank you for your answers.

I have decided not to populate a soap fault in my own soap processor and let my IS create the soap fault.

But what I am not understanding is the “SOAP-FAULT” in my document “GenergyTTHandlingOutput”?
“SOAP-FAULT” = “SOAP-ENV:fault” ?

Dominique.

Dominique,

I did not understand that you were attempting to create a custom soap processor. In order to namespace-qualify the SOAP-FAULT docuemnt type you need to rename it with a some XML namespace prefix (e.g. SOAP-ENV:SOAP-FAULT) and then populate the nsDecls parameter to associate that prefix with the correct namespace. Then when you add the fault to the body of your soap response message, you won’t receive the error.

Hope that helps,

Mark

I have the same problem many times, I have it now on webMethods IS 6.1.
I have found that instead of create custom SOAP Processor, is easier to create small Java service with our own implementation of SOAPException, and throw this exception from the service invoked as a Web Service.
In private static String getFaultFormat() in SOAP-ENC:Fault you can write whathever you want, but according to WSDL you implementing.

service:

throw new MySOAPException();

imports:

com.wm.app.b2b.server.SOAPException

source:

static class MySOAPException extends SOAPException {

/**
  Values are not very important.
 */
    static String faultcode="1";
    static String faultstring="fault";
    static String faultactor="23";
    static String faultdetail="55555";
    static Object[] subs = new Object[3];
    static Throwable e = new ServiceException("OK?");
    static IData other = IDataFactory.create();
    public MySOAPException() {
        super(faultcode, faultstring, faultactor, faultdetail, subs, e, other);
    }

/**
  Default body to replace with a proper one with serialization of the exception object thrown as the fault.
*/
    private static String getFaultFormat() {
        return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
            + "<SOAP-ENV:Envelope \n"
            + "    xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\"\n"
            + "    xmlns:xsi=\"http://www.w3.org/1999/XMLSchema-instance\"\n"
            + "    xmlns:xsd=\"http://www.w3.org/1999/XMLSchema\">\n"
            + "  <SOAP-ENV:Body>\n"
            + "   <SOAP-ENV:Fault>\n"
            + "    <faultcode>SOAP-ENV:{0}</faultcode>\n"
            + "    <faultstring>{1}</faultstring>\n"
            + "    <faultactor>{2}</faultactor>\n"
            + "{3}{4}"
            + "   </SOAP-ENV:Fault>\n"
            + "  </SOAP-ENV:Body>\n"
            + "</SOAP-ENV:Envelope>\n";
    }
}