Couple notes: 1) I was able to reproduce this and am testing a fix now.
2) That said, you could work around it by adding wsdlLocation = "classpath:/schemas/business/JournalinfoApoteketRIV/EhrExtractionInteraction.wsdl" to the @WebService annotation on Responder.java. That way, it will use the original WSDL/schemas and not generate a new one. 3) NORMALLY, ws-addressing stuff isn't specified as message parts and stuff explicitely like that. Normally, you would just specify a <wswa:UsingAddressing xmlns:wswa="http://www.w3.org/2005/02/addressing/wsdl"/> assertion on the port and let the WS-Addressing runtime handle the rest. Dan On Thu June 11 2009 10:35:54 am Magnus Larsson wrote: > Hello! > > We try to bind a To-element from WS-Addressing in the SOAP-header but the > CXF service then creates an incorrect wsdl when it is asked for the wsdl > using the "url + ?wsdl". > > This creates problems for example when trying to test the service using > soapui or creating a .Net WCF client. > > The usage of the wsa-To - element is described briefly below and I have > also attached a maven project that can be used to reproduce the problem. > > > > The WSDL use the wsa:To element like: > > 1. Import ws-addressing types as: > > <wsdl:types> > > <xs:schema> > > <xs:import schemaLocation= > "../../technical/wsaddressing/ws-addressing-1.0.xsd" namespace=" > http://www.w3.org/2005/08/addressing"/> > > </xs:schema> > > </wsdl:types> > > > 2. Declare the wsa:To-element as a part of the message: > > <wsdl:message name="PingRequest"> > > <wsdl:part name="LogicalAddress" element="wsa:To" /> > > <wsdl:part name="parameters" element="tjs:Ping"/> > > </wsdl:message> > > 3. Bind the wsa:To part (named LogicalAddress) of the message to the SOAP > header: > > <wsdl:binding ...> > > <soap:binding style="document" .../> > > <wsdl:operation name="Ping"> > > <soap:operation soapAction= > "urn:riv:ehr:ehrexchange:EhrExtractionResponder:1:Ping"/> > > <wsdl:input> > > <soap:header use="literal" message="PingRequest" part="LogicalAddress"/> > > <soap:body use="literal" parts="parameters"/> > > </wsdl:input> > > 3. Everything works fine on the wire using a cxf client > I.e. the To element comes as part of the soap-header > > > 4. The wsdl produced by url + ?wsdl is however incomplete. > > The wsa:To-element is now declared in the generated wsdl as: > > <xsd:schema attributeFormDefault="unqualified" > > elementFormDefault="unqualified" targetNamespace=" > http://www.w3.org/2005/08/addressing" > > xmlns:tns="http://www.w3.org/2005/08/addressing" xmlns:xsd=" > http://www.w3.org/2001/XMLSchema"> > > <xsd:element name="To" nillable="true" type="tns:AttributedURIType" /> > > </xsd:schema> > > > The problem is that the type that wsa:To is based on, > "tns:AttributedURIType", is never declared. > > Is there anything we can do to make CXF also produce definitions for the > tns:AttributedURIType - type? > > > > If you want to reproduce this problem you can download and unzip the > attached zip-file with maven projects and run the commands: > > cd rivta-bp20-refapp > mvn install > mvn -e exec:java > -Dexec.mainClass="se.skl.rivta.bp20.refapp.producer.Server" > -Dexec.args="http://localhost:10000/rivtabp20/refapp/riv13606RequestEHR" > curl http://localhost:10000/rivtabp20/refapp/riv13606RequestEHRExtract?wsdl > > Regards, > Magnus. -- Daniel Kulp [email protected] http://www.dankulp.com/blog
