You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Anthony Fryer <ap...@hotmail.com> on 2014/11/29 04:28:51 UTC
Re: JAX-WS: Reading WSDL file from JAR file
This is interesting because I found i had to use "classpath:..." in
wsdlLocation when i was setting up tomee to reuse a single JAXBContext like
follows...
@Stateless
@Local(AcceptPaymentForAncillariesPortType.class)
@WebService(
portName="AcceptPaymentForAncillariesPortType",
serviceName="AcceptPaymentForAncillariesService",
targetNamespace =
"urn:www.virginaustralia.com:service:contract:departure-management",
endpointInterface="com.virginaustralia.service.contract.departure_management.AcceptPaymentForAncillariesPortType",
wsdlLocation="classpath:/com/virginaustralia/service/contract/departure_management/AcceptPaymentForAncillaries.wsdl"
)
public class AcceptPaymentForAncillariesImpl implements
AcceptPaymentForAncillariesPortType {
...
}
The thread related to this is here
http://tomee-openejb.979440.n4.nabble.com/Use-single-JAXBContext-for-multiple-web-services-td4670019.html
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/JAX-WS-Reading-WSDL-file-from-JAR-file-tp4670256p4673080.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Re: JAX-WS: Reading WSDL file from JAR file
Posted by Romain Manni-Bucau <rm...@gmail.com>.
1.7.2-SNAPSHOT/2.x should be better on it, you can check it when next
snapshot will be deployed
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2014-12-01 1:44 GMT+01:00 Anthony Fryer <ap...@hotmail.com>:
> Actually looks like i do still get the error message in the log file when
> using the relative path form of wsdlLocation...
>
> Dec 01, 2014 10:48:27 AM org.apache.openejb.config.WsDeployer getWsdl
> SEVERE: Unable to read wsdl file
> META-INF/wsdl/AcceptPaymentForAncillaries.wsdl
>
> Just missed it before but my application works regardless of this error
> message.
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/JAX-WS-Reading-WSDL-file-from-JAR-file-tp4670256p4673083.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
Re: JAX-WS: Reading WSDL file from JAR file
Posted by Anthony Fryer <ap...@hotmail.com>.
Actually looks like i do still get the error message in the log file when
using the relative path form of wsdlLocation...
Dec 01, 2014 10:48:27 AM org.apache.openejb.config.WsDeployer getWsdl
SEVERE: Unable to read wsdl file
META-INF/wsdl/AcceptPaymentForAncillaries.wsdl
Just missed it before but my application works regardless of this error
message.
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/JAX-WS-Reading-WSDL-file-from-JAR-file-tp4670256p4673083.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Re: JAX-WS: Reading WSDL file from JAR file
Posted by Anthony Fryer <ap...@hotmail.com>.
I just tested this again because I remember at the time i used
"classpath:..." in the wsdlLocation i saw error messages in the log file
when booting up tomee. I have confirmed this just now but I have been
ignoring this error message because it doesn't seem to stop my application
from working properly.
For my webservice annotated as follows...
@Stateless
@Local(AcceptPaymentForAncillariesPortType.class)
@WebService(
portName="AcceptPaymentForAncillariesPortType",
serviceName="AcceptPaymentForAncillariesService",
targetNamespace =
"urn:www.virginaustralia.com:service:contract:departure-management",
endpointInterface="com.virginaustralia.service.contract.departure_management.AcceptPaymentForAncillariesPortType",
wsdlLocation="classpath:/META-INF/wsdl/AcceptPaymentForAncillaries.wsdl"
)
public class AcceptPaymentForAncillariesImpl implements
AcceptPaymentForAncillariesPortType {
...
}
When booting tomee, i get this error in the console...
Dec 01, 2014 9:57:45 AM org.apache.openejb.config.WsDeployer getWsdl
SEVERE: Unable to read wsdl file
classpath:/META-INF/wsdl/AcceptPaymentForAncillaries.wsdl
Even though that message is "SEVERE", it doesn't affect my application in
any way.
I just changed my wsdlLocation as follows...
@Stateless
@Local(AcceptPaymentForAncillariesPortType.class)
@WebService(
portName="AcceptPaymentForAncillariesPortType",
serviceName="AcceptPaymentForAncillariesService",
targetNamespace =
"urn:www.virginaustralia.com:service:contract:departure-management",
endpointInterface="com.virginaustralia.service.contract.departure_management.AcceptPaymentForAncillariesPortType",
wsdlLocation="META-INF/wsdl/AcceptPaymentForAncillaries.wsdl"
)
public class AcceptPaymentForAncillariesImpl implements
AcceptPaymentForAncillariesPortType {
...
}
Note the wsdlLocation path is relative. When i booted my application the
error message no longer appears and the web service also works.
If i change wsdlLocation to use an absolute path
(wsdlLocation="/META-INF/wsdl/AcceptPaymentForAncillaries.wsdl"), the I get
the error message...
SEVERE: Unable to read wsdl file
/META-INF/wsdl/AcceptPaymentForAncillaries.wsdl
and my web service no longer works. In this case cxf also throws an
exception...
SEVERE: Error deploying JAX-WS Web Service for EJB
AcceptPaymentForAncillariesImpl
org.apache.cxf.service.factory.ServiceConstructionException: Service class
com.virginaustralia.service.contract.departure_management.AcceptPaymentForAncillariesPortType
method AcceptPaymentForAncillaries part
{urn:www.virginaustralia.com:service:contract:departure-management}request
cannot be mapped to schema. Check for use of a JAX-WS-specific type without
the JAX-WS service factory bean.
So to summarize,
I can use wsdlLocation="classpath:<absolute_path_to_wsdl>" and my
application works but i get a "SEVERE: Unable to read wsdl file" error
message in the log file which i can seem to safely ignore.
I can use wsdlLocation="<relative_path_to_wsdl>" and it works and I get no
"SEVERE: Unable to read wsdl file" error message.
I cannot use wsdlLocation="<absolute_path_to_wsdl>". I get the "SEVERE"
Unable to read wsdl file" error message and also CXF throws an error when
trying to construct the service.
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/JAX-WS-Reading-WSDL-file-from-JAR-file-tp4670256p4673082.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Re: JAX-WS: Reading WSDL file from JAR file
Posted by Frederic Cornuau <fr...@gmail.com>.
AFAIK "classpath:" prefix is CXF specific.
I guess CXF tries to load the WSDL by itself if it is not loaded and
provided by TomEE.
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/JAX-WS-Reading-WSDL-file-from-JAR-file-tp4670256p4673081.html
Sent from the TomEE Users mailing list archive at Nabble.com.