1

I have two wsdls: ServiceA.wsdl(with targetNamespace='targetA'), and ServiceB.wsdl(with targetNamespace='targetB'). Both of them, are located in the same location, but each of them belongs to different target namespace.

I'd like to separate java sources generated via jaxb.

I use jaxb binding file:

  <?xml version="1.0" encoding="UTF-8"?>
    <jaxws:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
    <jaxws:bindings node="wsdl:definitions[@targetNamespace='targetA']"     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"  wsdlLocation="../my_wsdl_location/ServiceA.wsdl">
    <jaxws:package name="package.serviceA"/>
    </jaxws:bindings>
    <jaxws:bindings node="wsdl:definitions[@targetNamespace='targetB']"    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" wsdlLocation="../my_wsdl_location/ServiceB.wsdl">
    <jaxws:package name="package.serviceB"/>
    </jaxws:bindings>
    </jaxws:bindings>

But it doesn't work. I get error :

"XPath evaluation of `"wsdl:definitions[@targetNamespace='targetA']"` results in an empty target node". 

I guess, JAXB tries to evaluate XPATH >>wsdl:definitions[@targetNamespace='targetA']<< for file ServiceB.wsdl, but what about attribute >>wsdlLocation<< ?

I think, it should indicate proper wsdl.

Where is my fault ?

Thanks for help.

Best regards

mario

sAnS
  • 1,169
  • 1
  • 7
  • 10

0 Answers0