Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't consume existing .Net Framework WCF because it returns SOAP (MTOM) #2919

Closed
acsteitz opened this issue Jun 4, 2018 · 6 comments
Closed
Assignees
Labels
tooling An issues related to any tool shipped from this repo.

Comments

@acsteitz
Copy link

acsteitz commented Jun 4, 2018

Used the tool to generate code. Calling existing .Net Framework WCF endpoint but when trying to get the result I get an exception because the response is wrapped in a SOAP envelope. My main program is .Net Core 2.1 but the library I wrote to call the WCF is .Net Standard 2.0. I don't have control of the WCF endpoint so I cannot make changes there.
Any suggestions without using some of the hacks I have found online?
As you can see below the WCF endpoint processes the call just fine (ErrorMessage element is null, it returns an ItemNo, and Result is true) and I have verified it with the WCF owners.

One or more errors occurred. (The content type multipart/related; type="application/xop+xml"; start="
<http://tempuri.org/0>"; boundary="uuid:53616ef9-df69-40d7-be67-3b954e4ce5af+id=255897";
start-info="text/xml" of the response message does not match the content type of the binding (text/xml; charset=utf-8).
If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 549 bytes of the response were: '
--uuid:53616ef9-df69-40d7-be67-3b954e4ce5af+id=255897 Content-ID:
    <http://tempuri.org/0>Content-Transfer-Encoding: 8bit Content-Type: application/xop+xml;charset=utf-8;type="text/xml"
        <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
            <s:Body>
                <Item xmlns="http://tempuri.org/">
                    <ErrorMessage/>
                    <ExecutionSeconds>0</ExecutionSeconds>
                    <ItemNo>123456</ItemNo>
                    <Result>true</Result>
                </Item>
            </s:Body>
        </s:Envelope>--uuid:53616ef9-df69-40d7-be67-3b954e4ce5af+id=255897-- '.)
@mlacouture mlacouture added the tooling An issues related to any tool shipped from this repo. label Jun 4, 2018
@mlacouture
Copy link
Member

@mconnew, do you have any suggestions off the top of your head?

@mlacouture mlacouture added this to the S136 milestone Jun 4, 2018
@mlacouture mlacouture self-assigned this Jun 8, 2018
@mlacouture
Copy link
Member

@acsteitz, we haven't look into this detail yet but since you mentioned it, MTOM is not supported in the .NET Core platform.

@acsteitz
Copy link
Author

@mlacouture I found that info online, that is why I mentioned it. There are a HUGE number of existing WCF web services over which consumers have no control that return MTOM encoded results. I realize that it is up to the publisher of the service to "fix" this but in the mean time people who need to consume them have to resort to hacks. I realize that some backward compatibility had to be sacrificed for Core/Standard to be able to exist but the ability to consume existing services seems rather important. Seems that should be something that should be addressed soon. I am mostly a line-of-business app developer and have only written a small amount of "plumbing" type code but if someone would point me in the right direction I would be happy to take a crack at implementing something unless you all think the incompatibility is so deeply rooted that it would require a major overhaul.

@zhenlan
Copy link
Member

zhenlan commented Jun 12, 2018

Requests for MTOM and discussions are tracked in #1810.

@mlacouture mlacouture modified the milestones: S136, Future Jun 26, 2018
@shivdahiphale
Copy link

Is there any work around to consume Mtom encoding services in .net standard library. If it is available please let us know.

@mlacouture
Copy link
Member

@shivprasadd8, unfortunately we don't have a workaround to offer at this point. Please use #1810 for track MTOM support in the future. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling An issues related to any tool shipped from this repo.
Projects
None yet
Development

No branches or pull requests

4 participants