You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by cmathrusse <Ch...@sybase.com> on 2008/03/25 21:50:54 UTC
targetNamespace not being generated correctly
I've attempting to replace an existing WebService that is using Axis with
CXF. I would like the new service to look very similar to the existing
service. (As much as possible. Improving where it may be necessary) The
implementing class names and package names have changed from the original
ones. The existing service has a targetNamespace as follows:
targetNamespace="http://session.ejb.cosmos.it.sybase.com"
I've annotated the SEI as follows:
@WebService(targetNamespace = "session.ejb.cosmos.it.sybase.com", name =
"CosmosBroker")
and the Impl:
@WebService(endpointInterface = "com.sybase.it.cosmos.CosmosBroker",
portName = "CosmosBroker")
The issue is that the targetNamespace from the generated wsdl is not what I
had expected. (per the documentation)
Generated:
<?xml version="1.0" encoding="utf-8"?><wsdl:definitions
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:ns1="session.ejb.cosmos.it.sybase.com"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://impl.cosmos.it.sybase.com/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CosmosBrokerImplService"
targetNamespace="http://impl.cosmos.it.sybase.com/">
Existing service using Axis:
<wsdl:definitions targetNamespace="http://session.ejb.cosmos.it.sybase.com"
xmlns:impl="http://session.ejb.cosmos.it.sybase.com"
xmlns:intf="http://session.ejb.cosmos.it.sybase.com"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns1="http://beans.cosmos.it.sybase.com"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
Any suggestions as to how I can configure the service so the targetNamespace
matches the existing?
Thanks...
--
View this message in context: http://www.nabble.com/targetNamespace-not-being-generated-correctly-tp16288249p16288249.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: targetNamespace not being generated correctly
Posted by Ch...@sybase.com.
That did the trick.
Thanks...
Chris
Daniel Kulp <dk...@apache.org>
03/25/2008 02:00 PM
Please respond to
cxf-user@incubator.apache.org
To
cxf-user@incubator.apache.org
cc
cmathrusse <Ch...@sybase.com>
Subject
Re: targetNamespace not being generated correctly
This is a spec compliance thing as well.
Add the same targetNamespace to the @WebService annotation on the impl
and it should be fine.
@WebService(endpointInterface = "com.sybase.it.cosmos.CosmosBroker",
portName = "CosmosBroker"
targetNamespace = "session.ejb.cosmos.it.sybase.com")
Dan
On Tuesday 25 March 2008, cmathrusse wrote:
> I've attempting to replace an existing WebService that is using Axis
> with CXF. I would like the new service to look very similar to the
> existing service. (As much as possible. Improving where it may be
> necessary) The implementing class names and package names have changed
> from the original ones. The existing service has a targetNamespace as
> follows:
>
> targetNamespace="http://session.ejb.cosmos.it.sybase.com"
>
> I've annotated the SEI as follows:
> @WebService(targetNamespace = "session.ejb.cosmos.it.sybase.com", name
> = "CosmosBroker")
>
> and the Impl:
> @WebService(endpointInterface = "com.sybase.it.cosmos.CosmosBroker",
> portName = "CosmosBroker")
>
> The issue is that the targetNamespace from the generated wsdl is not
> what I had expected. (per the documentation)
>
> Generated:
> <?xml version="1.0" encoding="utf-8"?><wsdl:definitions
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:ns1="session.ejb.cosmos.it.sybase.com"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="http://impl.cosmos.it.sybase.com/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> name="CosmosBrokerImplService"
> targetNamespace="http://impl.cosmos.it.sybase.com/">
>
> Existing service using Axis:
> <wsdl:definitions
> targetNamespace="http://session.ejb.cosmos.it.sybase.com"
> xmlns:impl="http://session.ejb.cosmos.it.sybase.com"
> xmlns:intf="http://session.ejb.cosmos.it.sybase.com"
> xmlns:apachesoap="http://xml.apache.org/xml-soap"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:tns1="http://beans.cosmos.it.sybase.com"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
>
> Any suggestions as to how I can configure the service so the
> targetNamespace matches the existing?
>
> Thanks...
--
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog
Re: targetNamespace not being generated correctly
Posted by Daniel Kulp <dk...@apache.org>.
This is a spec compliance thing as well.
Add the same targetNamespace to the @WebService annotation on the impl
and it should be fine.
@WebService(endpointInterface = "com.sybase.it.cosmos.CosmosBroker",
portName = "CosmosBroker"
targetNamespace = "session.ejb.cosmos.it.sybase.com")
Dan
On Tuesday 25 March 2008, cmathrusse wrote:
> I've attempting to replace an existing WebService that is using Axis
> with CXF. I would like the new service to look very similar to the
> existing service. (As much as possible. Improving where it may be
> necessary) The implementing class names and package names have changed
> from the original ones. The existing service has a targetNamespace as
> follows:
>
> targetNamespace="http://session.ejb.cosmos.it.sybase.com"
>
> I've annotated the SEI as follows:
> @WebService(targetNamespace = "session.ejb.cosmos.it.sybase.com", name
> = "CosmosBroker")
>
> and the Impl:
> @WebService(endpointInterface = "com.sybase.it.cosmos.CosmosBroker",
> portName = "CosmosBroker")
>
> The issue is that the targetNamespace from the generated wsdl is not
> what I had expected. (per the documentation)
>
> Generated:
> <?xml version="1.0" encoding="utf-8"?><wsdl:definitions
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:ns1="session.ejb.cosmos.it.sybase.com"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="http://impl.cosmos.it.sybase.com/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> name="CosmosBrokerImplService"
> targetNamespace="http://impl.cosmos.it.sybase.com/">
>
> Existing service using Axis:
> <wsdl:definitions
> targetNamespace="http://session.ejb.cosmos.it.sybase.com"
> xmlns:impl="http://session.ejb.cosmos.it.sybase.com"
> xmlns:intf="http://session.ejb.cosmos.it.sybase.com"
> xmlns:apachesoap="http://xml.apache.org/xml-soap"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:tns1="http://beans.cosmos.it.sybase.com"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
>
> Any suggestions as to how I can configure the service so the
> targetNamespace matches the existing?
>
> Thanks...
--
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog