Thank you,
Now codegeneration thows a new exception:
Caused by: org.apache.cxf.tools.common.ToolException: Failed to create java
parameter for part [parameters] in method [wsData] - this wsdl is invalid,
please use the wsdlvalidator tool to validate this wsdl
at
org.apache.cxf.tools.common.model.JavaMethod.addParameter(JavaMethod.java:186)
But WSDL seems OK:
D:\>wsdlvalidator
d:\Temporal\ffpp\brunelleschi-wsdl-cxf\src\main\resources\META-INF\cxf\wsdl\common.SVGetWSData-customized.wsdl
WSIBP Validator found <{
http://svgetwsdata.services.common.product.cdsws.bs.com}
common.SVGetWSDataHttpBinding> is NOT a SOAP binding
Passed Validation : Valid WSDL
Please see WSDL attached.
Thank you in advance,
2011/12/1 Daniel Kulp <[email protected]>
>
> When modifying stuff in the schema, you have to use a jaxb binding, not a
> jaxws binding. We feed the schemas into JAXB and thus it has to be
> something
> that JAXB expects.
>
> Dan
>
>
> On Thursday, December 01, 2011 12:23:45 PM David Moron wrote:
> > Hello,
> >
> >
> > Due to a name conflict in a WSDL file i'm trying to customize class names
> > for conflicting elements. I've used an extenal binding file and an
> embedded
> > customization but in both cases the maven cxf-codegen-plugin throws an
> > exception:
> > Caused by: org.xml.sax.SAXParseException: Unexpected <jaxws:bindings>
> > appears at line 0 column 0
> > at
> >
> com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.unexpectedX(NGCCRuntimeEx.java:49
> > 9)
> >
> > Please see original and embedded WSDL attached.
> >
> > Binding customizacion in external file looks like:
> > <jaxws:bindings version="2.0"
> > wsdlLocation="wsdl/common.SVGetWSData.wsdl"
> > xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > xmlns:xs="http://www.w3.org/2001/XMLSchema">
> >
> > <jaxws:package name="com.bs.fp.servicios.host.svget"/>
> > <jaxws:bindings
> > node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='
> >
> http://svgetwsdata.services.common.product.cdsws.bs.com/xsd']/xs:complexType
> > [@name='WSDataResponse' ]">
> > <jaxws:class name="WSDataResponse" />
> > </jaxws:bindings>
> > </jaxws:bindings>
> >
> > What am I doing wrong?
> >
> > Thank you in advance
> --
> Daniel Kulp
> [email protected] - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>
--
David MorĂ³n Ruano
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns0="http://containers.common.product.cdsws.bs.com/xsd" xmlns:ns1="http://svgetwsdata.services.common.product.cdsws.bs.com" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ns3="http://data.cdsws.bs.com/xsd" xmlns:ns2="http://svgetwsdata.services.common.product.cdsws.bs.com/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" targetNamespace="http://svgetwsdata.services.common.product.cdsws.bs.com">
<wsdl:documentation>common.SVGetWSData</wsdl:documentation>
<wsdl:types>
<xs:schema xmlns:ax2692="http://containers.common.product.cdsws.bs.com/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://containers.common.product.cdsws.bs.com/xsd">
<xs:complexType name="WSData">
<xs:annotation>
<xs:appinfo>
<jaxb:class name="WSData" />
</xs:appinfo>
</xs:annotation>
<xs:sequence>
<xs:element minOccurs="0" name="dni" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
<xs:schema xmlns:ns="http://svgetwsdata.services.common.product.cdsws.bs.com" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://svgetwsdata.services.common.product.cdsws.bs.com">
<xs:element name="WSData">
<xs:complexType>
<xs:annotation>
<xs:appinfo>
<jaxb:class name="WSData2" />
</xs:appinfo>
</xs:annotation>
<xs:sequence>
<xs:element minOccurs="0" name="request" nillable="true" type="ns2:WSDataRequest"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="WSDataResponse">
<xs:complexType>
<xs:annotation>
<xs:appinfo>
<jaxb:class name="WSDataResponse2" />
</xs:appinfo>
</xs:annotation>
<xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true" type="ns2:WSDataResponse"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<xs:schema xmlns:ax2691="http://svgetwsdata.services.common.product.cdsws.bs.com/xsd"
xmlns:ax2693="http://containers.common.product.cdsws.bs.com/xsd"
xmlns:ax2695="http://data.cdsws.bs.com/xsd" attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://svgetwsdata.services.common.product.cdsws.bs.com/xsd">
<xs:import namespace="http://containers.common.product.cdsws.bs.com/xsd"/>
<xs:import namespace="http://data.cdsws.bs.com/xsd"/>
<xs:complexType name="WSDataRequest">
<xs:sequence>
<xs:element minOccurs="0" name="data" nillable="true" type="ax2693:WSData"/>
<xs:element minOccurs="0" name="header" nillable="true" type="ns3:RequestHeader"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="WSDataResponse">
<xs:annotation>
<xs:appinfo>
<jaxb:class name="WSDataResponse" />
</xs:appinfo>
</xs:annotation>
<xs:sequence>
<xs:element minOccurs="0" name="data" nillable="true" type="ax2693:WSData"/>
<xs:element minOccurs="0" name="header" nillable="true" type="ns3:ResponseHeader"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
<xs:schema xmlns:ax2694="http://data.cdsws.bs.com/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://data.cdsws.bs.com/xsd">
<xs:complexType name="RequestHeader">
<xs:sequence>
<xs:element minOccurs="0" name="product" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="sessionId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ResponseHeader">
<xs:sequence>
<xs:element minOccurs="0" name="sessionId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="WSDataRequest">
<wsdl:part name="parameters" element="ns1:WSData"/>
</wsdl:message>
<wsdl:message name="WSDataResponse">
<wsdl:part name="parameters" element="ns1:WSDataResponse"/>
</wsdl:message>
<wsdl:portType name="common.SVGetWSDataPortType">
<wsdl:operation name="WSData">
<wsdl:input message="ns1:WSDataRequest" wsaw:Action="urn:WSData"/>
<wsdl:output message="ns1:WSDataResponse" wsaw:Action="urn:WSDataResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="common.SVGetWSDataSOAP11Binding" type="ns1:common.SVGetWSDataPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="WSData">
<soap:operation soapAction="urn:WSData" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="common.SVGetWSDataSOAP12Binding" type="ns1:common.SVGetWSDataPortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="WSData">
<soap12:operation soapAction="urn:WSData" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="common.SVGetWSDataHttpBinding" type="ns1:common.SVGetWSDataPortType">
<http:binding verb="POST"/>
<wsdl:operation name="WSData">
<http:operation location="common.SVGetWSData/WSData"/>
<wsdl:input>
<mime:content type="text/xml" part="WSData"/>
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="WSData"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="common.SVGetWSData">
<wsdl:port name="common.SVGetWSDataSOAP11port_http" binding="ns1:common.SVGetWSDataSOAP11Binding">
<soap:address location="http://novades1:7130/cdsws/services/common.SVGetWSData"/>
</wsdl:port>
<wsdl:port name="common.SVGetWSDataSOAP12port_http" binding="ns1:common.SVGetWSDataSOAP12Binding">
<soap12:address location="http://novades1:7130/cdsws/services/common.SVGetWSData"/>
</wsdl:port>
<wsdl:port name="common.SVGetWSDataHttpport" binding="ns1:common.SVGetWSDataHttpBinding">
<http:address location="http://novades1:7130/cdsws/services/common.SVGetWSData"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>