0

So I have 2 projects A and B, A having a dependency on B in pom.xml . I have a file in A which wants to use a resource in B called C.wsdl. I use the following way to refer it:

 wsdlLocation="classpath:/wsdl/C/C.wsdl"

I installed B then installed A using maven. I open A's target folder and find A.zip. I extract A.zip and find a lib folder containing B's jar file. I extract the jar which has a folder C containing C.wsdl.

But I get the following error

Can't find wsdl at classpath:/wsdl/QuerySubscriberInfoService/QuerySubscriberInfoService?wsdl

Also that works if the file is in A itself.

Any idea where Im going wrong with this?

Parth Mody
  • 438
  • 1
  • 5
  • 17

1 Answers1

1

Seemingly, the author of this topic is having similiar problems, please check

XSD and WSDL in different directories

If this is possible for you to initialize wsdlLocation dynamically, you can use

ClassLoader.getSystemResource("wsdl/C/C.wsdl") 

Please note that it is only possible to extract content of such files (which are packaged inside of dependant jar) only via streams, i.e

ClassLoader.getSystemResourceAsStream("wsdl/C/C.wsdl") 
Community
  • 1
  • 1
Dmitry Kotov
  • 375
  • 3
  • 9