Skip to main content

.NET/C# client to Metro web service

5 replies [Last post]
Joined: 2008-06-17

I am running several Metro/WSIT (java source based) web services on tomcat and I'm attempting to verify interoperability with a C# client but cannot at all get it to consume the WSDL metro exposes. I'm using Metro 1.5 which claims interoperability with .NET 3.0 although I'm not exactly certain what that means since I haven't seen any examples or materials that show this working.

I'm particularly interested in getting a C# client to deal with a Saml Sender Vouches secured web service does anyone know of any good resources or examples along these lines?

I don't think the security is the issue as it stands however (at least not yet). At one point I know I generated C# proxy object using the wsdl/wsewsdl3.exe utility without issue but now it seems to complain that it doesn't support some rather simple XML schema stating:

"Found more than one parameter on method Delete while multiple parameters are not supported".

None of my methods take anything too terribly complicated, some simple beans and primitive types (mostly string/boolean). In this case it's two string arrays/lists which have simple XML schema like:

I simply can't imagine that .NET is so inept as to not be able to deal with this. I've searched around and found others who received the same error but found no acceptable answers, some claim that the java side is using data types that aren't basic profile compliant, etc. but this simply isn't the case.

So I guess this is a bit more of two questions in:

1.) Has anyone run into an error like this and found out how to deal with it (does it require a change on the java side of things)
2.) Does anyone know of any decent resources/examples/books, etc. that might aid in writing C# clients to secure web services (again particularly a Saml Sender Vouches secured service).

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2013-09-20

jusr study the difference between .net web service and .net remoting


Joined: 2008-06-17

Thanks for the info. I'm trying to look into this but I can't seem to get any of the interop sample from

to function period.

The glassfish targets seem specific to v2 so just to seeif I could get something working I backed up to v2

The src/mutual-certificate-10 contains a readme.txt that seems unrelated to it. I followed those instructions to run the /wsit/wsit/samples/ws-trust/src/fs example and that one seems to work fine (but it's not in the interop directory and doesn't use an STS)

After doing the install/configure trying 'ant s-s-s' in each of the src directories (figuring Sun Across the board would be the most likely to function, though I get similar failures with my desired 'ant m-s-s') I get:

SEVERE: WST0017:Could not obtain STS metadata. MEX call to STS http://localhost:8080/jaxws-trust-interop-mutual-certificate10-sts/sts failed.
(everything seemed to deploy fine, the failure is in the run-glassfish target)

[java] Run Scenario: Scenario_5_IssuedTokenForCertificate_MutualCertificate11
[java] STS_Endpoint_Address:
[java] Service_Endpoint_Address:
[java] Service_Endpoint_ConfigName:Scenario_5_IssuedTokenForCertificate_MutualCertificate11
[java] Result: FAIL
[java] Debuglog: Getting test parameters
[java] FederatedService_Endpoint_Address =
[java] SecurityTokenService_Endpoint_Address =
[java] System.ArgumentNullException: Value cannot be null.
[java] Parameter name: uriString
[java] at System.Uri..ctor(String uriString)
[java] at XwsInterop.HostedClient.HostedClientSoapImpl.SetCredentials(ChannelFactory channelFactory, String scenarioName, String stsUrl)
[java] at XwsInterop.HostedClient.HostedClientSoapImpl.RunTest(String configName, String stsUrl, String serviceUrl)

secureconversation-mutual-certificate-11 (using the Sun STS uncommented from etc/client-config/wsit-client.xml)

[wsimport] Consider using /
so that wsimport won't do unnecessary compilation
[wsimport] command line: wsimport -d /home/padams/misc_srcs/metro/samples/ws-trust/interop/src/build/classes -extension -g -keep -verbose http://localhost:8080/jaxws-trust-interop-secureconversation-mutual-cert... -b /home/padams/misc_srcs/metro/samples/ws-trust/interop/src/secureconversation-mutual-certificate-11/etc/custom-client.xml -b /home/padams/misc_srcs/metro/samples/ws-trust/interop/src/secureconversation-mutual-certificate-11/etc/custom-schema-client.xml
[wsimport] [failed to localize] wsimport.ParsingWSDL()
[wsimport] [failed to localize] wsimport.ErrorMessage([failed to localize] internalizer.XPathEvaluatesToNoTarget(/xs:schema))
[wsimport] [failed to localize] ConsoleErrorReporter.LineXOfY(49, file:/home/padams/misc_srcs/metro/samples/ws-trust/interop/src/secureconversation-mutual-certificate-11/etc/custom-client.xml)
[wsimport] [failed to localize] wsimport.WarningMessage([failed to localize] wsdlmodeler.warning.port.SOAPBinding12(Scenario_6_IssuedTokenForCertificateSecureConversation_MutualCertificate11))
[wsimport] [failed to localize] ConsoleErrorReporter.LineXOfY(249, http://localhost:8080/jaxws-trust-interop-secureconversation-mutual-cert...)
[wsimport] [failed to localize] Parsing.ParseFailed()

I can open that WSDL fine in the browser.

If I could get any one of these running I could see if they might be useful from a C# client but I can't and none seem to illustrate SAML interoperability. The real use case I need to prove out is an SSO scenario where the server trusts the client via certificate exchange and the client asserts a username without the need to supply a password (like SAML SV). Though any other interoperability with .NET where WS-Security/Trust is involved I'd like to see actually functioning.

As for interoperability do these samples/tests simply emulate a .NET client? There's no .NET/C# or VB code involved here?

As for writing an STS myself via Netbeans it's a bit of a pain since my final target platform is tomcat but the wizard for writing an STS requires glassfish (won't even allow me to create one until I set my server to glassfish even though the base classes are just part of metro).

Is there any decent documentation on what an STS should do? All of the examples I find on-line seem identical and simply extend and do nothing themselves internally. I guess I can go find the source for BaseSTSImpl and try to understand what it's doing. If I need to write one of these to interoperate with a .NET client this is hardly very useful however...

I've bought books on these J2EE/.NET interop but of course with how fast things move they're now hardly too useful since they talk about JWSDP and earlier versions of WCF.

Joined: 2005-11-02

Ok. We will check and fix the sample.

The contract between Metro based service and STS and .Net client is the WSDL.

So if you can run an all Java sample, you should get an idea what is going on.

Try out this one:

You will find how Metro STS works here:



Joined: 2005-11-02

For the security side, .Net WCF support Saml Sender Vouches secured web service
only through an WS-Trust based STS.

You may find many scenarios we have tested with .Net here:, check the parts for WS-Trust 1.0 and
WS-Trust 1.3.

You may find some samples here:

You can build STS and services using Netbeans:



Joined: 2005-11-02

This is an interesting blog from Microsoft om this: