Would you happen to have xalan on the classpath or in your war? The loss of the namespace prefix is a xalan bug. It's SUPPOSEDLY fixed in xalan 2.7.1, but that version has other problems that makes it not usable (and isn't in maven either). In most cases, you can remove xalan jar and just use the transformers built into the JDK. That version doesn't have the bug.

For CXF 2.1.1/2.0.7, we're switching to our own routines for printing the DOMs which doesn't drop the namespaces. You can try the latest snapshots to make sure.

Dan



On Jun 6, 2008, at 3:54 AM, Maurer Uwe wrote:

Hello,

this worked for me:

2) Update the <jaxws:endpoint> element in your config to add the
qnames for the service name and portname.

I changed my configuration like this...:

        <jaxws:endpoint id="FooService"
                wsdlLocation="WEB-INF/wsdl/main.wsdl"
                implementor="#fooService"
                address="/FooService"
                endpointName="ns0:HttpPort_Document"
                serviceName="ns0:FooService"
                xmlns:ns0="urn:FooService"
                />

...and now my service responds properly and is accessible from the clients.
Thanks a lot for your support!

There is one question remaining:
The original main.wsdl file is

<wsdl:definitions
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
        name="FooService"
        targetNamespace="urn:FooService"
        xmlns:bns0="urn:FooService/Http/document"
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";>
 <wsdl:import location="./bindings/Http_document.wsdl"
              namespace="urn:FooService/Http/document"/>
 <wsdl:service name="FooService">
   <wsdl:port name="HttpPort_Document" binding="bns0:HttpBinding">
     <soap:address
location="http://dev-was.foo.net:50000/FooService/Http? style=document"/>
   </wsdl:port>
 </wsdl:service>
</wsdl:definitions>


Mind the "bns0" namespace definition and its use in wsdl:[EMAIL PROTECTED]
My running Service responds with this file:

<wsdl:definitions
     name="FooService"
     targetNamespace="urn:FooService">
 <wsdl:import
location="http://localhost:8080/FooService/FooService?wsdl=./bindings/Http_d
ocument.wsdl"
              namespace="urn:FooService/Http/document"/>
 <wsdl:service name="FooService">
        <wsdl:port binding="bns0:HttpBinding" name="HttpPort_Document">
<soap:address location="http://localhost:8080/FooService/FooService "/>
   </wsdl:port>
 </wsdl:service>
</wsdl:definitions>

The "bns0" namespace definition is gone but it is still used within
wsdl:[EMAIL PROTECTED] I understand that CXF has to change the original input file (e.g. soap:address) but I do not understand what magic happens here
with the bns0 definition an its use.

Any hints? Thanks in advance.

Uwe

---
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog




Reply via email to