Skip to content

Result service is require WSDL file #140

Description

@mmuruev

In runtime after generation got weir error.

dummy-java-name/TestService.wsdl (No such file or directory).
	at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:235)
	at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:216)
	at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:179)
	at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:148)
	at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:336)
	at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:293)
	at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:201)
	at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:182)
	at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:178)
	at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:89)
	at jakarta.xml.ws.Service.<init>(Service.java:82)
	at com.test.demo.api.generated.TestService.<init>(FCUBSAccService.java:54)

I do belive that this is happening because this section in generated code

    static {
        URL url = TestService.class.getResource("TestService.wsdl");
        if (url == null) {
            url = TestService.class.getClassLoader().getResource("TestService.wsdl");
        }
        if (url == null) {
            java.util.logging.Logger.getLogger(TestService.class.getName())
                .log(java.util.logging.Level.INFO,
                     "Can not initialize the default wsdl from {0}", "TestService.wsdl");
        }
        WSDL_LOCATION = url;
    }

Seems weird solution bring whole WSDL file into build for one link only?? (and this can be big one). Second issue since you can see its not going to look for file into resources at all. I see by error it looking in the project root dir (dummy-java-name) is project dir.
Right path will be resources/main/wsdl/TestService.wsdl

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions