Call Java Web Service using C#

I'm using C# to call a Java Web Service.  I'm using Visual Studio 2015 The company gave me wsdl file and I generated the proxy class for wse 3.  I don't know WCF so I did it in wse 3

Here is my  app.config file

<?xml version="1.0" encoding="utf-8" ?>
		<section name="microsoft.web.services3" type="Microsoft.Web.Services3.Configuration.WebServicesConfiguration, Microsoft.Web.Services3, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
				<add valueType="">
					<sessionKeyAlgorithm name="AES128" />
					<keyAlgorithm name="RSAOAEP" />
			<x509 storeLocation="CurrentUser" />
				<add type="Microsoft.Web.Services3.Security.Tokens.EncryptedKeyTokenManager, Microsoft.Web.Services3, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="" localName="EncryptedKey">
					<keyAlgorithm name="SHA2" />
			<trace enabled="true" input="InputTrace.webinfo" output="OutputTrace.webinfo" />
			<detailedErrors enabled="true" />
		<policy fileName="wse3policyCache.config" />
			<mtom clientMode="On" serverMode="always" />
		<add key="SaveWholeSoapMessage" value="true" />

Open in new window

Here is my
wse3policyCache.config file
<policies xmlns="">
	<extension name="x509" type="Microsoft.Web.Services3.Design.X509TokenProvider, Microsoft.Web.Services3, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
	<extension name="mutualCertificate10Security" type="Microsoft.Web.Services3.Design.MutualCertificate10Assertion, Microsoft.Web.Services3, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
	<extension name="TESTPolicyAssertion" type="TESTWS.TESTPolicyAssertion, TESTWS" />
	<policy name="esar">
	<mutualCertificate10Security establishSecurityContext="false" renewExpiredSecurityContext="false" requireSignatureConfirmation="false" messageProtectionOrder="SignBeforeEncrypt" requireDerivedKeys="false" ttlInSeconds="300">
			<x509 storeLocation="CurrentUser" storeName="My" findValue="xxxxxxxx" findType="FindBySubjectName" />
			<x509 storeLocation="CurrentUser" storeName="AddressBook" findValue="xxxxxxxxx" findType="FindBySubjectName" />
			<request signatureOptions="IncludeSoapBody" encryptBody="true" />
			<response signatureOptions="IncludeSoapBody" encryptBody="true" />
			<fault signatureOptions="" encryptBody="false" />

Open in new window

Part of the payload is an attachment of a text file.  The problem I'm having is that when I turn on mtom (<mtom clientMode="On" serverMode="always" />) I get the following error:
Error: Client found response content type of 'multipart/related; boundary="MIMEBoundary_aecb5c92eb42927b74b62c638a6f50e004008366aba1005a"; type="application/soap+xml"; start="<>"; action="http://TEST/Transaction/Submission"', but expected 'application/soap+xml'.

If turn mtom to off I get this error:
<soap:Fault xmlns:env="" xmlns:soap=""><axis2ns1:Code xmlns:axis2ns1=""><axis2ns1:Value>env:Sender</axis2ns1:Value></axis2ns1:Code><axis2ns1:Reason xmlns:axis2ns1=""><soap:Text xml:lang="en-US">SOAP Body does not contain the CAQH CORE Connectivity Element : Checksum</soap:Text></axis2ns1:Reason></soap:Fault>

So the error above is complaining that I did not attach the file.  I'm assuming.

Not sure how to exactly debug this error.  I'm a bit lost here.  I am able to test the web service using SOAP UI where I'm able to attach the file and everything is working.
HItesh RanaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lock this article. May be it can help you
Webservice from c#
ste5anSenior DeveloperCommented:
You need to add a Service Reference in your project. See How to: Add, Update, or Remove a Service Reference.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HItesh RanaAuthor Commented:
@ste5an. What do you mean?  I created the proxy class from the wsdl file I got from the customer.  They don't expose the wsdl file on the web, I only have the wsdl file.  Does that make sense?
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

HItesh RanaAuthor Commented:
@ste5an.  I added the service reference by the file and now I get a 400 bad request error.
ste5anSenior DeveloperCommented:
That's the problem with separate WSDL files.. they are easily out of sync with the deployed service.
There is no activity from author
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.