You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by huntc <hu...@mac.com> on 2008/10/01 12:33:47 UTC

Re: Maven - java2ws - Namespace missing

Hi Jacqueline,

Did you ever get a reply to this or find a solution? It is just that I am
encountering the same issue. I am using v.2.1.2.

Kind regards,
Christopher
-- 
View this message in context: http://www.nabble.com/Maven---java2ws---Namespace-missing-tp18506523p19757827.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: AW: Maven - java2ws - Namespace missing

Posted by huntc <hu...@mac.com>.
Hi Jacqueline,

Well, it seems like declaring my webservice using just:

@WebService(targetNamespace = "myNamespace") 

solved the problem!

Also, you should only have to declare the target namespace on the interface
annotation - not the implementation one. I believe that java2ws looks only
at the interface.

In summary, we must use the annotation on the interface to declare target
namespaces, not the target namespace of the maven plugin.

Thanks for the reply.

Kind regards,
Christopher
-- 
View this message in context: http://www.nabble.com/Maven---java2ws---Namespace-missing-tp18506523p19770287.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: AW: Maven - java2ws - Namespace missing

Posted by Daniel Kulp <dk...@apache.org>.
Looking at the code, I see:
  private String targetNamespace;
Thus, the elementname in the pom probably should be that, and not 
targetNameSpace.   

Can you try that?

Dan


On Wednesday 01 October 2008, Preuss, Jacqueline - ENCOWAY wrote:
> Hi Christopher!
>
> No, I didn't got an answer.
>
> I solved my problem by generating the wsdl via the server (Tomcat by
> adding the CXF-Servlet and Spring context configuration) and calling
> the web service in the browser:
> http://localhost:8080/myWebservice?wsdl
>
> The namespace in this wsdl is generated by the annotations I added to
> my web service Interface:
>
> @WebService(targetNamespace = "myNamespace")
> interface IMyWebService {...}
>
> The implementing class gets the following annotations:
> @WebService(endpointInterface = "com.test.webservice.IMyWebService ",
> 		serviceName = "MyWebService" ,
> 		targetNamespace = "myNamespace ")
> public class MyWebService implements IMyWebService {...}
>
> Hope this helps.
>
> Regards,
> Jacqueline.
>
> > -----Ursprüngliche Nachricht-----
> > Von: huntc [mailto:huntc@mac.com]
> > Gesendet: Mittwoch, 1. Oktober 2008 12:34
> > An: users@cxf.apache.org
> > Betreff: Re: Maven - java2ws - Namespace missing
> >
> >
> >
> > Hi Jacqueline,
> >
> > Did you ever get a reply to this or find a solution? It is just that
> > I am encountering the same issue. I am using v.2.1.2.
> >
> > Kind regards,
> > Christopher
> > --
> > View this message in context:
> > http://www.nabble.com/Maven---java2ws---
> > Namespace-missing-tp18506523p19757827.html
> > Sent from the cxf-user mailing list archive at Nabble.com.



-- 
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog

AW: Maven - java2ws - Namespace missing

Posted by "Preuss, Jacqueline - ENCOWAY" <Pr...@encoway.de>.
Hi Christopher!

No, I didn't got an answer. 

I solved my problem by generating the wsdl via the server (Tomcat by adding the CXF-Servlet and Spring context configuration) and calling the web service in the browser: http://localhost:8080/myWebservice?wsdl 

The namespace in this wsdl is generated by the annotations I added to my web service Interface:

@WebService(targetNamespace = "myNamespace")
interface IMyWebService {...}

The implementing class gets the following annotations:
@WebService(endpointInterface = "com.test.webservice.IMyWebService ",
		serviceName = "MyWebService" ,
		targetNamespace = "myNamespace ")
public class MyWebService implements IMyWebService {...}

Hope this helps.

Regards,
Jacqueline.


> -----Ursprüngliche Nachricht-----
> Von: huntc [mailto:huntc@mac.com]
> Gesendet: Mittwoch, 1. Oktober 2008 12:34
> An: users@cxf.apache.org
> Betreff: Re: Maven - java2ws - Namespace missing
> 
> 
> 
> Hi Jacqueline,
> 
> Did you ever get a reply to this or find a solution? It is just that I am
> encountering the same issue. I am using v.2.1.2.
> 
> Kind regards,
> Christopher
> --
> View this message in context: http://www.nabble.com/Maven---java2ws---
> Namespace-missing-tp18506523p19757827.html
> Sent from the cxf-user mailing list archive at Nabble.com.