views:

898

answers:

1

I am trying to consume a third party WSDL using the Weblogic 10.3 clientgen ant task (which wraps wsimport). When doing this I get the following error:

[clientgen] [ERROR] in message "JobSubmissionErrorFault", part "exception" must specify a "element" attribute

Below is a subset of the WSDL I am trying to consume (names have been changed to protect the innocent)

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
              xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
              xmlns:xsd="http://www.w3.org/2001/XMLSchema"                
              xmlns:asjx="urn:XXXXX:XML:AAA:2006/01:Types"
              xmlns:tns="urn:XXXXX:Central:2006/01:AAAService"
              targetNamespace="urn:XXXXX:Central:2006/01:AAAService">
<wsdl:types>
<xsd:schema elementFormDefault="qualified"
            targetNamespace="urn:XXXXX:XML:AAA:2006/01:Types">

  <xsd:element name="SubmitRequest">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="Type" type="xsd:string" form="unqualified"/>
        <xsd:element name="Definition" type="xsd:string" form="unqualified"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="SubmitResponse">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="JobResult" type="asjx:JobResultType" form="unqualified"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>

  <xsd:complexType name="JobSubmissionErrorFaultType">
    <xsd:sequence>
      <xsd:element name="Detail" type="xsd:string" />
    </xsd:sequence>
  </xsd:complexType>

</xsd:schema>

Is this WSDL valid? Can wsdl:part 'type' be used when the element in question is a wsdl:fault? I have looked at the specifications and am a little confused.

Looking at this link it appears using type is not valid

The following link does not clarify if it is valid or not

And finally the following metro bug link (Weblogic 10.3 used metro under the covers) does not confirm if this is an issue or not (it is still being debated).

If anyone is able to confirm once and for all if using 'type' is valied for a wsdl:fault it would be much appreciated.

+1  A: 

Depends on who you ask. It's OK according to W3, but the WS-I people beg to differ.

WS-I: (BP2113) The soapbind:header, soapbind:headerfault or soapbind:fault elements refer to wsd:part element(s) that are not defined using only the "element" attribute.

Leprechaun