i'm trying to consume a SOAP Service in Java 11.
I've created my classes using com.sun.xml.ws:jaxws-maven-plugin:2.3.2, that's my pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>it.m2sc</groupId>
<artifactId>poc-ws-consumer-j11</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
</properties>
<dependencies>
<dependency>
<groupId>jakarta.xml.ws</groupId>
<artifactId>jakarta.xml.ws-api</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-ri</artifactId>
<version>2.3.1</version>
<type>pom</type>
</dependency>
</dependencies>
<build>
...
</build>
</project>
when I try to start my test program i got some warning like
WARNING: Using deprecated META-INF/services mechanism with non-standard property: javax.xml.soap.MetaFactory. Property javax.xml.soap.SAAJMetaFactory should be used instead.
and an error
SEVERE: WSP1005: Failed to find policy referenced by URI "http://int-vwe1c01.m2sc.local:8080/EngageOneWS/DeliveryService?wsdl#WSPolicy".
in DeliveryService.wsdl i found the import of WSPolcy
<wsdl:import location="http://int-vwe1c01.m2sc.local:8080/EngageOneWS/DeliveryService?wsdl=ws-policy.xml" namespace="http://pb.com/EngageOne/ws/WSPolicy"/>
and references
<wsdl:binding name="DeliveryServiceSOAP" type="DeliveryService">
<wsp:PolicyReference URI="#WSPolicy"/>
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
...
</wsdl:binding>
I tried to import ws-policy.xml as separate wsdl using
<configuration>
<wsdlUrls>
<wsdlUrl>http://int-vwe1c01.m2sc.local:8080/EngageOneWS/DeliveryService?wsdl</wsdlUrl>
<wsdlUrl>http://int-vwe1c01.m2sc.local:8080/EngageOneWS/DeliveryService?wsdl=ws-policy.xml</wsdlUrl>
</wsdlUrls>
<quiet>true</quiet>
</configuration>
but it wont work. I made a try switching library, using Apache CXF 3.5.4 and it's works fine so I thins JAX-WS not handle URL starting with "#" correctly. It`s a major switch to go with CXF, I prefere to stay with JAX-WS.
Someon can help me pls ?