none
WSDL Request Throwing Exception RRS feed

  • Question

  • Project: Visual Studio 2012/C#/Web Service

    Employs Custom Bindings (public static CustomBinding HttpsSSLBinding()) and a Behavior Configuration that has both Client Credentials and Server Certificate.

    The web service is hosted by Anthem Blue Cross. When I started the project it was so complex that neither myself nor the Anthem programmers could get it. The custom bindings and multiple certs caused everyone headaches. Anthem pulled some weight and brought in someone from Microsoft and even he had difficulties. It was quite a slog with several programmers on multiple conference calls over several weeks. We eventually went live over a year ago, but now Anthem has changed the WSDL and we are stumped again. It works in SoapUI 3.5.

    The full code for the request is below. In the original WSDL the line response = client.searchMCPClaims(ref header1, request); only had the ‘request’ as a parameter. The ‘header1’ was a part of the request. In the new WSDL it is broken out, and you’ll notice I must pass it as a ref.

    I do get a valid response when viewing the round trip with Fiddler. However, in Visual Studio I get an exception on the client.searchMCPClaims() line of “The 'header1', 'http://wellpoint.com/esb/header/v2' required message part was not signed.” No one knows what this means or why the header1 must be passed as a ref. I’m not sure if the two are connected. The outgoing request is valid because I get a valid response. But Visual Studio doesn't like it because, “required message part was not signed”

    var request = new searchMCPClaimsRequest()
    {
       PayLoad = new PayLoad()
       {
          ClaimsEBSRequest = new ClaimsEBSRequest()
          {
             ClinicalServiceRequest = new ClaimsEBSRequestClinicalServiceRequest()
             {
                birthDate = sDOB,
                endDate = sEndDate,
                firstName =  sFirstName,
                lastName = sLastName,
                mcId = "",
                memberId = sCharNumber,
                reportRequested = "0010111111",
                sensitiveCode = "1",
                startDate = sStartDate
             }
          }
       }
    };
    
    var header1 = new ESBHeaderType()
    {
       srvcVersion = "XXXX",
       operName = "XXXX",
       senderApp = "XXXX",
       transId = "XXXX"
    };
    
    using (var scope = new OperationContextScope(client.InnerChannel))
    {
       var context = new Context()
       {
          domainName = "XXXX",
          srvcName = "XXXX",
          srvcVersion = "1.0",
          operName = "XXXX",
          operVersion = "1",
          senderApp = "XXXX",
          msgTyp = "Request"
       };
       var header = MessageHeader.CreateHeader("Context", "http://wellpoint.com/esb/context", context);
       OperationContext.Current.OutgoingMessageHeaders.Add(header);
       response = client.searchMCPClaims(ref header1, request);
       //Console.WriteLine("Response = {0}", response);

    Thursday, December 12, 2013 3:55 PM

All replies