Hi again
Sorry for the self-response, but I found the solution : adding -impl in 
the wsdl2java command line solved both issues : create a default 
implementation, and name the service correctly

I published a small sample here



Riccardo Cohen wrote:
> Hi
> I really need help, does anybody knows how to do that ?
> Thanks a lot.
> Riccardo Cohen wrote:
>> Hello
>> The last point now is to make a web service that conforms to what my 
>> customer needs = the wsdl provided.
>> I created the java code with cxf's wsdl2java. The source generated 
>> compiled fine in resin 4.0.8 (needing more jars than I expected).
>> First the web service did not answer to the request /CarteMusique?wsdl 
>> complaining that there was no implementation. Actually it's true, there 
>> was no class generated for the implementation... So I copied the 
>> interface generated and made an empty implementation. Now the service 
>> answers correctly to ?wsdl
>> But the generated service do not conform to the client. I have a little 
>> java app testing the web service, given by my customer. It answers this:
>> javax.xml.ws.WebServiceException: Could not find service named 
>> {http://services/}CarteMusiqueWS in wsdl 
>> http://localhost:8000/CarteMusique?wsdl
>> That seems true : the wsdl generated do not have the same service name:
>> initial wsdl :
>> <definitions name='CarteMusiqueWS'...
>> <service name='CarteMusiqueWS'>
>> wsdl provided by generated code :
>> <wsdl:definitions name="CarteMusiqueWSImplService" ...
>> <wsdl:service name="CarteMusiqueWSImplService">
>> 1) the name of the service is the name of the class and not the interface
>> 2) the word "Service" is added and I cannot do anything about it
>> This is the resin conf:
>>    <servlet-mapping url-pattern="/CarteMusique/*" 
>> servlet-class="mscartem.CarteMusiqueWSImpl">
>>      <protocol uri="cxf:"/>
>>    </servlet-mapping>
>> and this is the web service interface
>> @WebService(targetNamespace = "http://services/";, name = "CarteMusiqueWS")
>> @XmlSeeAlso({ObjectFactory.class})
>> public interface CarteMusiqueWS {
>> I tried to add serviceName="CarteMusiqueWS" but it still anwsers 
>> "CarteMusiqueWSImplService"
>> I also tried to add wsdlLocation = "file:....CarteMusiqueWS.wsdl" but it 
>> did not change.
>> Thanks for any tip :)

Riccardo Cohen
Architecte du Logiciel
+33 (0)
Membre du réseau http://www.reflexe-conseil-centre.org

resin-interest mailing list

Reply via email to