On Apr 10, 2013, at 2:11 AM, Ted Roeloffzen <[email protected]> wrote:
> Thank you Glen, the problem is that we don't use a cxf-servlet.xml, we
> create the endpoints in code.
>
> javax.xml.ws.Endpoint endpoint =
> javax.xml.ws.Endpoint.create(webserviceImpl);
> endpoint.publish(address);
>
> Can i set the wsdllocation when creating an endpoint in code?
If using Endpoint.create(….) things, it's a bit convoluted.
After create(…), you can do:
Map<String, Object> props = new HashMap<String, Object>();
props.put("javax.xml.ws.wsdl.description", "/location/of/wsdl…");
endpoint.setProperties(props);
and then it SHOULD be picked up. I think.
You could also directly cast the Endpoint to a
org.apache.cxf.jaxws.EndpointImpl and call the setWsdlLocation method on it.
Likely easier. :-)
Dan
>
>
>
> 2013/4/9 Glen Mazza <[email protected]>
>
>> The wsdlLocation field in the cxf-servlet.xml file should do it for you:
>> http://www.jroller.com/gmazza/**entry/web_service_tutorial#**WFstep6<http://www.jroller.com/gmazza/entry/web_service_tutorial#WFstep6>
>>
>> Note the endpoint URL in the WSDL will still get overwritten based on
>> deployment configuration decisions you've made, as discussed in note #2
>> here:
>> http://www.jroller.com/gmazza/**entry/web_service_tutorial#**notes<http://www.jroller.com/gmazza/entry/web_service_tutorial#notes>
>>
>> Glen
>>
>>
>> On 04/09/2013 10:00 AM, Ted Roeloffzen wrote:
>>
>>> Hello all,
>>>
>>> I'm having some difficulty with CXF.
>>> I got a WSDL from an external party and used this to create a
>>> webservice-server.
>>> For this I used de codegen-plugin for maven.
>>>
>>> When I check the definition of the server, by going to the url and adding
>>> ?wsdl, then I receive a WSDL that seems to be generated by CXF and has an
>>> import to the WSDL that i used to generate the code.
>>> The problem is that the external party can't connect with our server
>>> because of the differences between the WSDL's.
>>>
>>> Is it possible to tell CXF not to generate a wsdl, but return the WSDL
>>> that
>>> is in the import-statement?
>>>
>>> best regards,
>>>
>>> Ted
>>>
>>>
>>
--
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com