[
https://issues.apache.org/jira/browse/CXF-5476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13857528#comment-13857528
]
Vitalii Tymchyshyn commented on CXF-5476:
-----------------------------------------
For me the workaround is to override the port before creating dispatch:
{code}
service.addPort(portQName, SOAPBinding.SOAP11HTTP_BINDING,
requestParams.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY).toString());
{code}
> NPE while trying to create a dispatch for SOAP service without port address
> specified in WSDL
> ---------------------------------------------------------------------------------------------
>
> Key: CXF-5476
> URL: https://issues.apache.org/jira/browse/CXF-5476
> Project: CXF
> Issue Type: Bug
> Components: JAX-WS Runtime
> Affects Versions: 2.7.3
> Reporter: Vitalii Tymchyshyn
>
> I am trying to create a dispatch from WSDL-based service, specifying port
> name, jaxbContext and Mode = Payload.
> I am getting NullPointerException:
> {code}
> Caused by: java.lang.NullPointerException
> at
> org.apache.cxf.jaxws.ServiceImpl.getJaxwsEndpoint(ServiceImpl.java:254)
> at org.apache.cxf.jaxws.ServiceImpl.createDispatch(ServiceImpl.java:625)
> at org.apache.cxf.jaxws.ServiceImpl.createDispatch(ServiceImpl.java:694)
> at org.apache.cxf.jaxws.ServiceImpl.createDispatch(ServiceImpl.java:686)
> at javax.xml.ws.Service.createDispatch(Service.java:488)
> {code}
> because of this line
> {code}
> if (portInfo != null &&
> !portInfo.getAddress().equals(ei.getAddress())) {
> {code}
> postInfo is not null, but it's address is null in my case. I am going to set
> javax.xml.ws.service.endpoint.address request property to use the dispatch
> created.
> P.S. I've checked on trunk, it has same code
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)