Webservice client calling error

Posted on 2011-10-26
Last Modified: 2012-05-12
I am calling webservice methods by using proxy.
In my proxy class iam using WSE3.0 username tokens to call the soap header.

Iam getting below error:

Encountered error preparing request, no valid response retrieved from server. Exception: EligibilityBase.EligibilityNoResponseException: Encountered error sending or receiving transaction, no valid response retrieved from server. Exception: System.InvalidOperationException: Client found response content type of 'multipart/related; boundary="MIMEBoundaryurn_uuid_A21DAFBFF9538048ED1319647533317"; type="application/xop+xml"; start="<>"; start-info="application/soap+xml";action=""', but expected 'application/soap+xml'.
The request failed with the error message:
content-type: application/xop+xml; charset=utf-8; type="application/soap+xml"
content-transfer-encoding: binary
content-id: <>

Thanks in advance.
Question by:Nettodotnet
    LVL 29

    Accepted Solution


    which code part get error, provide the ur code

    as per my understanding bellow url give some idea

    Author Comment

    Here is my code:
     COREEnvelopeRealTimeRequest req = new COREEnvelopeRealTimeRequest();
                    req.PayloadType = TNCaidSettings.PayloadType;  
                    req.ProcessingMode = TNCaidSettings.ProcessingMode;
                    req.PayloadID = _transactionNumber.ToString();
                    req.TimeStamp = _pickupDate.ToString();
                    req.SenderID = TNCaidSettings.SubmitterId;
                    req.ReceiverID = TNCaidSettings.ReceiverId.ToString();
                    req.CORERuleVersion = TNCaidSettings.CoreRuleVersion;
                    req.Payload = _rawTransaction;

                    MyCore client = new MyCore();

                        UsernameToken tok = new UsernameToken(TNCaidSettings.UserName, TNCaidSettings.Password, PasswordOption.SendPlainText);
                        client.RequestSoapContext.Security.EncodedMustUnderstand= "false";
                        client.RequestSoapContext.Addressing.Action = "false";
                        client.Url = TNCaidSettings.RemoteAddress;
                        COREEnvelopeRealTimeResponse resp = client.RealTimeTransaction(req);--Here iam getting above error.
                        return resp.Payload;

    Here is the soap message i looked into fiddler:

    content-type: application/xop+xml; charset=utf-8; type="application/soap+xml"
    content-transfer-encoding: binary

    content-id: <>
    <?xml version="1.0" encoding="utf-8"?>
    <soapenv:Envelope xmlns:soapenv="" xmlns:wsa="">
    <soapenv:Body><ns2:COREEnvelopeRealTimeResponse xmlns:ns2=""><PayloadType>X12_10</PayloadType><ProcessingMode>RealTime</ProcessingMode><PayloadID>12319</PayloadID><TimeStamp>2011-10-27T09:22:06-0400</TimeStamp><SenderID>300</SenderID><ReceiverID>13476</ReceiverID><CORERuleVersion>2.0.1</CORERuleVersion><Payload>&lt;![CDATA[--some payload data--
    ]]&gt;</Payload><ErrorCode>Success</ErrorCode><ErrorMessage>Request was processed successfully</ErrorMessage></ns2:COREEnvelopeRealTimeResponse>

    Author Closing Comment

    The link is very use full to me

    Expert Comment

    Were you able to resolve this issue?  If so, can you give me some more detail about your solution?  Thanks

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
    Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
    The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now