App Connect

App Connect

Join this online user group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Problems to call Web Services with SOAP 1.2 through SOAPRequest [Code]

  • 1.  Problems to call Web Services with SOAP 1.2 through SOAPRequest [Code]

    Posted Mon September 23, 2013 10:18 PM

    Hi,


    I'm trying to access a Web Services (WCF) through SOAPRequest node and is generating the Fault Exception "The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver.  Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).".


    My Flow is SOAPInput -> Compute Node -> SOAPRequest -> SOAPReply. I'm using Compute node because I put de SOAP version and others attributes in Context.


    I think the problem is the SOAP Action, because he did not put in the Content-Type, when I run the SOAP UI works and the only difference seems to be the SOAPAction. Has anyone had this problem?


    Information obtained from TCPMon:


    SOAP UI:


    POST /Gmi3/EnvioEmailService.svc HTTP/1.1
    Accept-Encoding: gzip,deflate
    Content-Type: application/soap+xml;charset=UTF-8;action="http://tempuri.org/IEnvioEmailService/EnviarEmailCompleto"
    Content-Length: 1226
    Host: hostname:9898
    Connection: Keep-Alive
    User-Agent: Apache-HttpClient/4.1.1 (java 1.5)


    SOAPRequest:


    POST /Gmi3/EnvioEmailService.svc HTTP/1.1
    Content-Length: 389
    Content-Type: application/soap+xml; charset=utf-8
    Host: hostname:9898
    SOAPAction: "http://tempuri.org/IEnvioEmailService/EnviarEmailCompleto"
    Connection: Keep-Alive


    The information below (simple sample):


    Code - Compute Node


    CREATE FUNCTION Main() RETURNS BOOLEAN


    BEGIN


                    SET OutputRoot.SOAP.Context.Namespace.(SOAP.NamespaceDecl)xmlns:soap12 = soap;


                    SET OutputRoot.SOAP.Context.Namespace.(SOAP.NamespaceDecl)xmlns:tem = tem;


                    SET OutputRoot.SOAP.Context.SOAP_Version = '1.2';


                    --SET OutputRoot.SOAP.Context."Content-Type" = 'application/soap+xml; charset=utf-8; action="http://tempuri.org/IEnvioEmailService/EnviarEmailCompleto';


                    SET OutputRoot.SOAP.Context."Content-Type" = 'application/soap+xml; charset=utf-8';


                    SET OutputRoot.SOAP.Body.tem:EnviarEmail.tem:emailDestino = InputRoot.XMLNSC.*.Destino;


                    SET OutputRoot.SOAP.Body.tem:EnviarEmail.tem:assuntoEmail = InputRoot.XMLNSC.*.Assunto;


                    SET OutputRoot.SOAP.Body.tem:EnviarEmail.tem:corpoMensagem = InputRoot.XMLNSC.*.Mensagem;


                    IF InputRoot.XMLNSC.*.Formato = 'HTML' THEN


                                    SET OutputRoot.SOAP.Body.tem:EnviarEmail.tem:html = 1;


                    ELSE


                                    SET OutputRoot.SOAP.Body.tem:EnviarEmail.tem:html = 0;


                    END IF;


                   RETURN TRUE;


    END;


    Tks.



  • 2.  Problems to call Web Services with SOAP 1.2 through SOAPRequest [Code]

    Posted Tue September 24, 2013 06:55 AM
    Hi,
    Please check following :

    Different contracts between client and sender.
    You're using a different binding between client and sender.
    The message security settings are not consistent between client and sender.

    Regards,
    Akhnukh 


     


  • 3.  Problems to call Web Services with SOAP 1.2 through SOAPRequest [Code]

    Posted Mon December 09, 2013 11:42 AM
    It worked fine in MB 8.0.0.3