[ 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to