You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-dev@ws.apache.org by "Oliver Waeldrich (JIRA)" <ji...@apache.org> on 2006/12/11 14:03:22 UTC
[jira] Created: (MUSE-161) Code generation fails, if the wsdl-file
contains imports
Code generation fails, if the wsdl-file contains imports
--------------------------------------------------------
Key: MUSE-161
URL: http://issues.apache.org/jira/browse/MUSE-161
Project: Muse
Issue Type: Bug
Components: Tooling - Code Generation
Affects Versions: 2.1.0
Reporter: Oliver Waeldrich
Assigned To: Dan Jemiolo
The code generation fails, if the wsdl-file to generate code from contains imports. You can simple test this by adding e.g.
<wsdl:import namespace="http://docs.oasis-open.org/wsrf/sgw-2"
location="WS-ServiceGroup-1_2.wsdl" />
to a wsdl-file. The reason seems to be the new wsdl4j implementation. In the ResourceInspector provides at generation time no path to the wsdl-file. However, wsdl4j 1.6.1 seems to require this somehow. Therefore the path should be initialized with the path to the wsdl-file, like indicated with the sample below.
String path = null; // this does not work
String path = "/path/to/my/wsdl/file"; // this works
if (env != null)
path = env.getRealDirectory().getAbsolutePath();
try
{
WSDLFactory factory = WSDLFactory.newInstance();
WSDLReader reader = factory.newWSDLReader();
reader.setFeature(WsdlUtils.WSDL4J_VERBOSE_FLAG, true);
def = reader.readWSDL(path, wsdl);
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org
[jira] Updated: (MUSE-161) Code generation fails, if the wsdl-file
contains imports
Posted by "Dan Jemiolo (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/MUSE-161?page=all ]
Dan Jemiolo updated MUSE-161:
-----------------------------
Fix Version/s: 2.2.0
Looks like the issue is limited to WSDL imports... if you import or include schemas in <wsdl:types/> it seems to work. This is what's done in the sample WSDL from the tutorial. The workaround, then, is to include <wsdl:message/> elements in the concrete WSDL you're generating from; the wsdlmerge tool can be used to automate this process.
I'm going to schedule this for 2.2
> Code generation fails, if the wsdl-file contains imports
> --------------------------------------------------------
>
> Key: MUSE-161
> URL: http://issues.apache.org/jira/browse/MUSE-161
> Project: Muse
> Issue Type: Bug
> Components: Tooling - Code Generation
> Affects Versions: 2.1.0
> Reporter: Oliver Waeldrich
> Assigned To: Dan Jemiolo
> Fix For: 2.2.0
>
>
> The code generation fails, if the wsdl-file to generate code from contains imports. You can simple test this by adding e.g.
> <wsdl:import namespace="http://docs.oasis-open.org/wsrf/sgw-2"
> location="WS-ServiceGroup-1_2.wsdl" />
> to a wsdl-file. The reason seems to be the new wsdl4j implementation. In the ResourceInspector provides at generation time no path to the wsdl-file. However, wsdl4j 1.6.1 seems to require this somehow. Therefore the path should be initialized with the path to the wsdl-file, like indicated with the sample below.
> String path = null; // this does not work
> String path = "/path/to/my/wsdl/file"; // this works
>
> if (env != null)
> path = env.getRealDirectory().getAbsolutePath();
>
> try
> {
> WSDLFactory factory = WSDLFactory.newInstance();
> WSDLReader reader = factory.newWSDLReader();
> reader.setFeature(WsdlUtils.WSDL4J_VERBOSE_FLAG, true);
> def = reader.readWSDL(path, wsdl);
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org
[jira] Assigned: (MUSE-161) Code generation fails, if the wsdl-file
contains imports
Posted by "Dan Jemiolo (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MUSE-161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Jemiolo reassigned MUSE-161:
--------------------------------
Assignee: Andrew Eberbach (was: Dan Jemiolo)
> Code generation fails, if the wsdl-file contains imports
> --------------------------------------------------------
>
> Key: MUSE-161
> URL: https://issues.apache.org/jira/browse/MUSE-161
> Project: Muse
> Issue Type: Bug
> Components: Tooling - Code Generation
> Affects Versions: 2.1.0
> Reporter: Oliver Waeldrich
> Assigned To: Andrew Eberbach
> Fix For: 2.2.0
>
>
> The code generation fails, if the wsdl-file to generate code from contains imports. You can simple test this by adding e.g.
> <wsdl:import namespace="http://docs.oasis-open.org/wsrf/sgw-2"
> location="WS-ServiceGroup-1_2.wsdl" />
> to a wsdl-file. The reason seems to be the new wsdl4j implementation. In the ResourceInspector provides at generation time no path to the wsdl-file. However, wsdl4j 1.6.1 seems to require this somehow. Therefore the path should be initialized with the path to the wsdl-file, like indicated with the sample below.
> String path = null; // this does not work
> String path = "/path/to/my/wsdl/file"; // this works
>
> if (env != null)
> path = env.getRealDirectory().getAbsolutePath();
>
> try
> {
> WSDLFactory factory = WSDLFactory.newInstance();
> WSDLReader reader = factory.newWSDLReader();
> reader.setFeature(WsdlUtils.WSDL4J_VERBOSE_FLAG, true);
> def = reader.readWSDL(path, wsdl);
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org
[jira] Resolved: (MUSE-161) Code generation fails, if the wsdl-file
contains imports
Posted by "Andrew Eberbach (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MUSE-161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Eberbach resolved MUSE-161.
----------------------------------
Resolution: Fixed
Forgot to remove the wsdl:imports from the wsdls. By the time
we're passing them through to the inspect (which passes them to wsdl4j) we've
already done all of our own importing, so these imports don't matter any more and
should be removed.
It should be noted that if you import wsdls the only things that are pulled in are the schemas from the types sections of the imported wsdls. These get inlined in the wsdl that comes out of wsdl2java.
> Code generation fails, if the wsdl-file contains imports
> --------------------------------------------------------
>
> Key: MUSE-161
> URL: https://issues.apache.org/jira/browse/MUSE-161
> Project: Muse
> Issue Type: Bug
> Components: Tooling - Code Generation
> Affects Versions: 2.1.0
> Reporter: Oliver Waeldrich
> Assigned To: Andrew Eberbach
> Fix For: 2.2.0
>
>
> The code generation fails, if the wsdl-file to generate code from contains imports. You can simple test this by adding e.g.
> <wsdl:import namespace="http://docs.oasis-open.org/wsrf/sgw-2"
> location="WS-ServiceGroup-1_2.wsdl" />
> to a wsdl-file. The reason seems to be the new wsdl4j implementation. In the ResourceInspector provides at generation time no path to the wsdl-file. However, wsdl4j 1.6.1 seems to require this somehow. Therefore the path should be initialized with the path to the wsdl-file, like indicated with the sample below.
> String path = null; // this does not work
> String path = "/path/to/my/wsdl/file"; // this works
>
> if (env != null)
> path = env.getRealDirectory().getAbsolutePath();
>
> try
> {
> WSDLFactory factory = WSDLFactory.newInstance();
> WSDLReader reader = factory.newWSDLReader();
> reader.setFeature(WsdlUtils.WSDL4J_VERBOSE_FLAG, true);
> def = reader.readWSDL(path, wsdl);
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org