eclipse-ee4j / eclipse-ee4j/metro-wsit

SSL M2S interop test fails when using MEX instead of ?wsdl

Open
#217 0 comments 0 reactions 0 assignees View on GitHub
Component: mex ERR: Assignee metro2_0-waived Priority: Minor Type: Bug
Dominant language
Java
Stars
6
Forks
21
Avg merge
10h 2m
Merged PRs (30d)
1

Description

An SSL based SecureConversation interop test fails in the M->S mode when using MEX.
When the MEX URL [https://localhost:8181/jaxws-sc5/simple](https://localhost:8181/jaxws-sc5/simple) is provided to the MS
client instead of [https://localhost:8181/jaxws-sc5/simple?wsdl](https://localhost:8181/jaxws-sc5/simple?wsdl), the test fails
throwing the error "System.InvalidOperationException: Metadata contains a
reference that cannot be resolved:
'https://karthik.india.sun.com:8181/jaxws-sc5/simple'. --->
System.ArgumentException: The provided URI scheme 'https' is invalid; expected
'http'." . Error log at [1].
=========================
[1]
DynamicProxyFactory contructed with wsdlUri :
[https://karthik.india.sun.com:8181/jaxws-sc5/simple](https://karthik.india.sun.com:8181/jaxws-sc5/simple)
In DynamicProxyFactory constructor DynamicProxyFactory(wsdlUri =
[https://karthik.india.sun.com:8181/jaxws-sc5/simple](https://karthik.india.sun.com:8181/jaxws-sc5/simple) ,dynamicProxyfactoryOptions
= DynamicProxyFactoryOptions[Language=CS,FormatMode=Auto,CodeModifier=])
In code to use WS-MEX in MS client
endpoint address : [https://karthik.india.sun.com:8181/jaxws-sc5/simple](https://karthik.india.sun.com:8181/jaxws-sc5/simple)
ERROR: System.InvalidOperationException: Metadata contains a reference that
cannot be resolved: 'https://karthik.india.sun.com:8181/jaxws-sc5/simple'. --->
System.ArgumentException: The provided URI scheme 'https' is invalid; expected
'http'.
Parameter name: via
at System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
at
System.ServiceModel.Channels.HttpChannelFactory.ValidateCreateChannelParameters(EndpointAddress
remoteAddress, Uri via)
at
System.ServiceModel.Channels.HttpChannelFactory.OnCreateChannel(EndpointAddress
remoteAddress, Uri via)
at
System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress
address, Uri via)
at
System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress
address, Uri via)
at
System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress
to, Uri via)
at
System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress
address, Uri via)
at System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type
channelType, EndpointAddress address, Uri via)
at System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address,
Uri via)
at System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address)
at
System.ServiceModel.Description.MetadataExchangeClient.MetadataReferenceRetriever.DownloadMetadata(TimeoutHelper
timeoutHelper)
at
System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper
timeoutHelper)
— End of inner exception stack trace —
at
System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper
timeoutHelper)
at
System.ServiceModel.Description.MetadataExchangeClient.ResolveNext(ResolveCallState
resolveCallState)
at
System.ServiceModel.Description.MetadataExchangeClient.GetMetadata(MetadataRetriever
retriever)
at System.ServiceModel.Description.MetadataExchangeClient.GetMetadata(Uri
address, MetadataExchangeClientMode mode)
at
Microsoft.Xws.Test.Suite.Util.WsdlTestUtilities.DynamicProxy.DynamicProxyFactory.DownloadMetadata()
at
Microsoft.Xws.Test.Suite.Util.WsdlTestUtilities.DynamicProxy.DynamicProxyFactory..ctor(String
wsdlUri, DynamicProxyFactoryOptions options)
at
XwsInterop.HostedClient.HostedClientSoapImpl.CreateProxy(HostedClientParameter[]
parameters, String scenarioName, String wsdlUri, String contractName)
at XwsInterop.HostedClient.HostedClientSoapImpl.runScenario(String
featureName, String scenarioName, HostedClientParameter[] parameters)
#### Environment
Operating System: All
Platform: All
#### Affected Versions
[current]

Source: [https://github.com/javaee/metro-wsit/issues/548](https://github.com/javaee/metro-wsit/issues/548)
Author: glassfishrobot

Contributor guide

Open the contributing guide

Research direction

Start at Microsoft.Xws.Test.Suite.Util.WsdlTestUtilities.DynamicProxy.DynamicProxyFactory.DownloadMetadata() and the MetadataExchangeClient call shown in the error log. Reproduce the SSL M2S scenario with the MEX URL instead of ?wsdl, then verify that metadata retrieval accepts the HTTPS endpoint and the interop test completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, java
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.