Hi Vojtech,
Can you file a JIRA issue for this and attach your WSDL? I'll take a look and get it fixed soon.
- Dan

Vojtech Knezu wrote:
Hello Dan et all,

please help me with problems when generating XFire client with xmlbeans binding. I take the attached WSDL (generated by BEA WebLogic) and try to generate a client via WsGenTask. I get the following exception
Caused by: java.lang.IllegalArgumentException: Invalid name [null]
at org.codehaus.xfire.service.MessagePartContainer.addMessagePart(Messag
ePartContainer.java:55)
at org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.createMessagePart
(WSDLServiceBuilder.java:351)
at org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.createMessagePart
s(WSDLServiceBuilder.java:343)
at org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.visit(WSDLService
Builder.java:316)
at org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.visit(WSDLService
Builder.java:277)
at org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.walkTree(WSDLServ
iceBuilder.java:160)
at org.codehaus.xfire.gen.Wsdl11Generator.generate(Wsdl11Generator.java:
53)
        at org.codehaus.xfire.gen.WsGenTask.execute(WsGenTask.java:37)


The corresponding XML bean is on the classpath. A mapping between namespaces and Java packages (xsdconfig) was used. It might be caused by fact, that element "submitInvoice" contains elements from an imported schema. But, hard to say.


Thanks for your help,

Vojtech


P.S. I had to shorten the WSDL, it was too long to send it to this mailing list.


------------------------------------------------------------------------

<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"; xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/"; 
xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/"; xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"; xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/"; 
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; xmlns:s="http://www.w3.org/2001/XMLSchema"; xmlns:s0="http://www.openuri.org/"; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; targetNamespace="http://www.openuri.org/";>
  <types>
    <s:schema xmlns:s="http://www.w3.org/2001/XMLSchema"; 
xmlns:inv="http://gitus.com/b2b4g/edixml/invoice"; elementFormDefault="qualified" 
targetNamespace="http://www.openuri.org/";>
      <s:import namespace="http://gitus.com/b2b4g/edixml/invoice"/>
      <s:element name="submitInvoice">
        <s:complexType>
          <s:sequence>
            <s:element ref="inv:Envelope"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="submitInvoiceResponse">
        <s:complexType>
          <s:sequence/>
        </s:complexType>
      </s:element>
    </s:schema>
    <!-- edited with XMLSpy v2006 sp2 U (http://www.altova.com) by Martin Vizek 
(GITUS a.s.) -->
    <!-- vygenerovano pomoci EDIxml2xsd.XSL(1.3) z EDIxml 
MapForce(http://www.altova.com/download/2006/MapForceEDIFACT2006.exe) -->
    <xs:schema xmlns:tns="http://gitus.com/b2b4g/edixml/invoice"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
targetNamespace="http://gitus.com/b2b4g/edixml/invoice";>
      <xs:element name="Envelope" type="tns:envelope"/>
      <xs:complexType name="envelope">
        <xs:sequence>
          <xs:element name="Interchange" type="tns:interchange"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="additional">
        <xs:sequence>
          <xs:element name="Invoice" minOccurs="0">
            <xs:annotation>
              <xs:documentation>Additional informations for 
Invoice</xs:documentation>
            </xs:annotation>
            <xs:complexType>
              <xs:sequence>
                <xs:element name="systemDespatchAdviceNumber" minOccurs="0">
                  <xs:annotation>
                    <xs:documentation>systemDespatchAdviceNumber: substring 9 right 
chars of original number or modified by system</xs:documentation>
                  </xs:annotation>
                  <xs:simpleType>
                    <xs:restriction base="xs:string">
                      <xs:maxLength value="9"/>
                      <xs:minLength value="0"/>
                    </xs:restriction>
                  </xs:simpleType>
                </xs:element>
                <xs:element name="systemOrderNumber" minOccurs="0">
                  <xs:annotation>
                    <xs:documentation>systemOrderNumber: substring 9 right chars of 
original number of Order</xs:documentation>
                  </xs:annotation>
                  <xs:simpleType>
                    <xs:restriction base="xs:string">
                      <xs:maxLength value="9"/>
                      <xs:minLength value="0"/>
                    </xs:restriction>
                  </xs:simpleType>
                </xs:element>
                <xs:element name="systemInvoiceNumber" minOccurs="0">
                  <xs:annotation>
                    <xs:documentation>systemOrderNumber: substring 9 right chars of 
original number of Order</xs:documentation>
                  </xs:annotation>
                  <xs:simpleType>
                    <xs:restriction base="xs:string">
                      <xs:maxLength value="9"/>
                      <xs:minLength value="0"/>
                    </xs:restriction>
                  </xs:simpleType>
                </xs:element>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="interchange">
<xs:sequence> </xs:sequence> </xs:complexType> </xs:schema> </types>
  <message name="submitInvoiceSoapIn">
    <part name="parameters" element="s0:submitInvoice"/>
  </message>
  <message name="submitInvoiceSoapOut">
    <part name="parameters" element="s0:submitInvoiceResponse"/>
  </message>
  <portType name="B2BSoap">
    <operation name="submitInvoice">
      <input message="s0:submitInvoiceSoapIn"/>
      <output message="s0:submitInvoiceSoapOut"/>
    </operation>
  </portType>
  <binding name="B2BSoap" type="s0:B2BSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"; 
style="document"/>
    <operation name="submitInvoice">
      <soap:operation soapAction="http://www.openuri.org/submitInvoice"; 
style="document"/>
      <input>
        <soap:body use="literal"/>
      </input>
      <output>
        <soap:body use="literal"/>
      </output>
    </operation>
  </binding>
  <service name="B2B">
    <port name="B2BSoap" binding="s0:B2BSoap">
      <soap:address 
location="http://a25:7001/Processes/com/gitus/b2b4g/process/test/B2B.jws"/>
    </port>
  </service>
</definitions>


--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com
http://netzooid.com/blog

Reply via email to