eclipse-ee4j / eclipse-ee4j/metro-wsit

wsdl import incorrectly not changing namespace

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

Description

Hi, for the following wsit-client.xml file here:
[https://github.com/gmazza/blog-samples/blob/master/metro_sts_tutorial/client/src/main/resources/wsit-client.xml](https://github.com/gmazza/blog-samples/blob/master/metro_sts_tutorial/client/src/main/resources/wsit-client.xml)

The namespace attributes are (as far as I can tell) incorrectly not overwriting the namespaces declared within the original file, i.e., regardless of what I place there the client will run successfully so long as the target namespaces within the two imported files are correct. For example, the "http://tempuri.org/" reassignment of the namespace for the STS config file in wsit-client.xml should cause the client to fail to work, but it works fine.

OTOH, if I change the targetNamespace attribute directly in either or both of the imported .xml files: [https://github.com/gmazza/blog-samples/tree/master/metro_sts_tutorial/client/src/main/resources](https://github.com/gmazza/blog-samples/tree/master/metro_sts_tutorial/client/src/main/resources), the client will correctly fail to run.

To test:

1.) Check out the blog-samples at [https://github.com/gmazza/blog-samples/downloads](https://github.com/gmazza/blog-samples/downloads) and run mvn clean install from the root folder (necessary to install the parent-level pom file in your local repo).
2.) (Optional) Configure your Tomcat installation to be able to handle the Tomcat maven plugin (i.e., so mvn tomcat:redeploy works) as described here:
[http://www.jroller.com/gmazza/entry/web_service_tutorial#maventomcat](http://www.jroller.com/gmazza/entry/web_service_tutorial#maventomcat)
3.) Navigate to the metro-sts-tutorial folder and run mvn tomcat:redeploy if you did #2 above, or manually copy the WSP and STS wars to your Tomcat deploy folder if you did not. Make sure you can see the STS and WSP WSDLs at [http://localhost:8080/DoubleItSTS/STS?wsdl](http://localhost:8080/DoubleItSTS/STS?wsdl) and [http://localhost:8080/doubleit/services/doubleit?wsdl](http://localhost:8080/doubleit/services/doubleit?wsdl) before continuing.
4.) Navigate to the metro_sts_tutorial/client folder and run mvn exec:exec — you'll see the client incorrectly run successfully. Testing subsequent edits to the wsit-client.xml and imported files can be done by running "mvn clean install exec:exec" from the client folder afterwards.
#### Environment
Metro 2.2.1-1; JDK 7 update 9 on Ubuntu OS.
#### Affected Versions
[2.2.1]

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

Contributor guide

Open the contributing guide

Research direction

Reproduce the behavior from metro_sts_tutorial/client/src/main/resources/wsit-client.xml and its imported XML files. Start by running the documented Maven setup and client commands, then compare behavior after changing the namespace attributes in wsit-client.xml versus the imported files. Done means namespace reassignment in wsit-client.xml is applied consistently and the client no longer succeeds when those namespaces are invalid.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.