Hi,

I would like to configure a cxfbc:provider/cxfbc:consumer proxy bridge to an 
external webservice.
The xbeans.xml is:

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0";
  xmlns:person="http://servicemix.apache.org/samples/wsdl-first";>

  <cxfbc:consumer wsdl="classpath:person.wsdl"
    targetService="person:PersonService"
    targetInterface="person:Person"
    locationURI="http://0.0.0.0:8082/PS";
    targetEndpoint="PSProxy"
  />

  <cxfbc:provider wsdl="classpath:person.wsdl"
    
locationURI="http://localhost:9080/cfx-wsdl-first-xsd-war/services/PersonService";
    service="person:PersonService"
    interfaceName="person:Person"
    endpoint="PSProxy"
   />

The WSDL imports XSDs  to define the types instead of .

      <wsdl:types>
      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";
        targetNamespace="http://www.w3.org/2001/XMLSchema";
        xmlns:jaxb="http://java.sun.com/xml/ns/jaxb";
        jaxb:version="2.0">
        <xsd:annotation><xsd:appinfo>
          <jaxb:schemaBindings>
            <jaxb:package name="de.heuboe.simtd.tmm.jaxb"/>
          </jaxb:schemaBindings>
        </xsd:appinfo></xsd:annotation>
        <xsd:import 
namespace="http://servicemix.apache.org/samples/wsdl-first/types";
          schemaLocation="person.xsd" />
      </xsd:schema>

After deployment I can get the WSDL under "http://localhost:8082/PS?wsdl. But a 
closer look reveals, that the imports are replaced by the schema they contain 
with the problem, that the namespaces are not longer correct.

<wsdl:types>
<xs:schema jaxb:version="2.0" 
targetNamespace="http://www.w3.org/2001/XMLSchema"; 
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:tns="http://servicemix.apache.org/samples/wsdl-first"; 
xmlns:typens="http://servicemix.apache.org/samples/wsdl-first/types"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
    <xsd:annotation>
    <xsd:appinfo>
          <jaxb:schemaBindings>
            <jaxb:package name="de.heuboe.simtd.tmm.jaxb"/>
          </jaxb:schemaBindings>
        </xsd:appinfo>
  </xsd:annotation>
  <xsd:element name="GetPerson">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="personId" type="xsd:string"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="GetPersonResponse">
    <xsd:complexType>
      <xsd:sequence>
          <xsd:element name="personId" type="xsd:string"/>
        <xsd:element name="ssn" type="xsd:string"/>
        <xsd:element name="name" type="xsd:string"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="UnknownPersonFault">
    <xsd:complexType>
               <xsd:complexContent>
                       <xsd:extension base="hb:ExceptionInfo"/>
               </xsd:complexContent>
    </xsd:complexType>
  </xsd:element>


        <xs:simpleType name="Identifier">
               <xs:annotation>
                       <xs:documentation>
                               HB wide string id type to use in soap 
web-services
                       </xs:documentation>
               </xs:annotation>
               <xs:restriction base="xs:string"/>
        </xs:simpleType>

        <xs:complexType name="ExceptionInfo">
               <xs:annotation>
                       <xs:documentation>
                               HB wide exception type that should be use in a 
WS-Exception/Fault-element
                       </xs:documentation>
               </xs:annotation>
               <xs:sequence>
                       <xs:element name="errorType" type="xs:string">
                               <xs:annotation>
                                      <xs:documentation>
                                              Should be restricted by a derived 
object via
                                              the fixed keyword to a constant 
value that describes the type.
                                              E.g. fixed="DBException".
                                      </xs:documentation>
                               </xs:annotation>
                       </xs:element>
                       <xs:element name="errorCode" type="xs:string">
                               <xs:annotation>
                                      <xs:documentation>
                                              Specification of the (type) of 
error.
                                      </xs:documentation>
                               </xs:annotation>
                       </xs:element>
                       <xs:element minOccurs="0" name="errorDescription" 
type="xs:string">
                               <xs:annotation>
                                      <xs:documentation>
                                              Longer textual description of the 
error
                                      </xs:documentation>
                               </xs:annotation>
                       </xs:element>
               </xs:sequence>
        </xs:complexType>
   </xs:schema>
</wsdl:types>

Is this a bug or do I need to set a certain property ?

BTW:
If you deploy the consumer and the provider in to seperate service assemblies 
the expected WSDL is returned.
If you just use to service units it seems, only the first will be depoyed.
If you use more than one <xs:schema> element with the <xs:types> element it 
won't work in any constalation, but if you call the service directly everything 
is fine.



xbeans.xml, wsdl etc. are attached to this mail.

-----
Thanx in advance
Jürgen

Attachment: xbean.xml
Description: xbean.xml

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
    targetNamespace="http://servicemix.apache.org/samples/wsdl-first/types"; 
    xmlns:per="http://servicemix.apache.org/samples/wsdl-first/types"; 
    xmlns:hb="http://ws.heuboe.de/base"; 
    elementFormDefault="qualified">


  <!-- importiere die HB Basis Strukturen -->
  <xsd:import
    namespace="http://ws.heuboe.de/base"; 
    schemaLocation="jhbWSBase.xsd"
  />


  <xsd:element name="GetPerson">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="personId" type="xsd:string"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="GetPersonResponse">
    <xsd:complexType>
      <xsd:sequence>
          <xsd:element name="personId" type="xsd:string"/>
        <xsd:element name="ssn" type="xsd:string"/>
        <xsd:element name="name" type="xsd:string"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="UnknownPersonFault">
    <xsd:complexType>
		<xsd:complexContent>
			<xsd:extension base="hb:ExceptionInfo" />
		</xsd:complexContent>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema 
	xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
	targetNamespace="http://ws.heuboe.de/base"; 
	xmlns:hb="http://ws.heuboe.de/base"; 
	elementFormDefault="qualified">
	
	<xs:simpleType name="Identifier">
		<xs:annotation>
			<xs:documentation>
				HB wide string id type to use in soap web-services
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string" />
	</xs:simpleType>
	
	<xs:complexType name="ExceptionInfo">
		<xs:annotation>
			<xs:documentation>
				HB wide exception type that should be use in a WS-Exception/Fault-element
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="errorType" type="xs:string">
				<xs:annotation>
					<xs:documentation>
						Should be restricted by a derived object via 
						the fixed keyword to a constant value that describes the type.
						E.g. fixed="DBException". 
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="errorCode" type="xs:string">
				<xs:annotation>
					<xs:documentation>
						Specification of the (type) of error. 
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="errorDescription" type="xs:string" minOccurs="0">
				<xs:annotation>
					<xs:documentation>
						Longer textual description of the error 
					</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
</xs:schema>

Reply via email to