Hi,

A service provider generated a wsdl using weblogic workbench.  The bpel
compiler generates errors attempting to parse the file.  (I've included a
sanitized version of the wsdl).
The problem may be the use of a namespace inside the type declarations which
differs from the target namespace of the wsdl.  I'm not sure if BEA's tool
is out of spec here, or if bpelc does not account for this condition.
(I am able to get the wsdl to import if I collapse the two schema blocks
into one and unify the namespaces.)

ping]$ /opt/apache-ode-jbi-1.0-incubating/bin/bpelc.sh Ping.bpel
file:/opt/.../examples/PingPong/ping/BEA-generated.wsdl:0: error:
[SchemaError] Error in schema processing: src-resolve.4.2: Error resolving
component 'java:BEAExampleType'. It was detected that 'java:BEAExampleType'
is in namespace 'java:com.thisprogram.beans', but components from this
namespace are not referenceable from schema document
'file:/opt/.../examples/PingPong/ping/BEA-generated.wsdl'. If this is the
incorrect namespace, perhaps the prefix of 'java:BEAExampleType' needs to be
changed. If this is the correct namespace, then an appropriate 'import' tag
should be added to 'file:/opt/.../examples/PingPong/ping/BEA-generated.wsdl
'.
java org.apache.ode.tools.bpelc.cline.BpelC: error: [CompilationErrors]
Compilation completed with 1 error(s).


Thanks,
Dan
<?xml version='1.0' encoding='UTF-8'?>
<definitions name="BEAExampleServiceDefinitions" targetNamespace="http://example.org"; xmlns="http://schemas.xmlsoap.org/wsdl/"; xmlns:s0="http://example.org"; xmlns:s1="http://schemas.xmlsoap.org/wsdl/soap/";>
  <types>
    <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://example.org"; xmlns:xs="http://www.w3.org/2001/XMLSchema";>
      <xs:element name="BEAExampleMethod2">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="BEAExample" type="java:BEAExampleType" xmlns:java="java:com.thisprogram.beans"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="BEAExampleMethod2Response">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="return" type="java:MyResponseMethod2Type" xmlns:java="java:com.thisprogram.beans"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="BEAExampleMethod1">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="BEAExample" type="java:BEAExampleType" xmlns:java="java:com.thisprogram.beans"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="BEAExampleMethod1Response">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="return" type="java:MyResponseMethod1Type" xmlns:java="java:com.thisprogram.beans"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
    <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="java:com.thisprogram.beans" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
      <xs:complexType name="MyResponseMethod1Type">
        <xs:sequence>
          <xs:element minOccurs="1" name="Estimateroutetime" nillable="true" type="xs:string"/>
          <xs:element minOccurs="1" name="Method2Count" nillable="false" type="xs:int"/>
          <xs:element minOccurs="1" name="Method1Image" nillable="true" type="java:ImageType" xmlns:java="java:com.thisprogram.beans"/>
          <xs:element minOccurs="1" name="RequestId" nillable="true" type="xs:string"/>
          <xs:element minOccurs="1" name="TimeStamp" nillable="true" type="xs:string"/>
          <xs:element minOccurs="1" name="UserID" nillable="true" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="ImageType">
        <xs:sequence>
          <xs:element minOccurs="1" name="BrX" nillable="false" type="xs:float"/>
          <xs:element minOccurs="1" name="BrY" nillable="false" type="xs:float"/>
          <xs:element minOccurs="1" name="Image" nillable="true" type="xs:string"/>
          <xs:element minOccurs="1" name="TlX" nillable="false" type="xs:float"/>
          <xs:element minOccurs="1" name="TlY" nillable="false" type="xs:float"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="BEAExampleType">
        <xs:sequence>
          <xs:element minOccurs="1" name="AnotherVariable" nillable="true" type="java:SpecialType" xmlns:java="java:com.thisprogram.beans"/>
          <xs:element minOccurs="1" name="AnotherVariable2" nillable="true" type="xs:string"/>
          <xs:element minOccurs="1" name="SomeonesID" nillable="true" type="xs:string"/>
          <xs:element minOccurs="1" name="Something" nillable="true" type="java:SpecialType" xmlns:java="java:com.thisprogram.beans"/>
          <xs:element minOccurs="1" name="RequestId" nillable="true" type="xs:string"/>
          <xs:element minOccurs="1" name="RequestType" nillable="true" type="xs:string"/>
          <xs:element minOccurs="1" name="TimeStamp" nillable="true" type="xs:string"/>
          <xs:element minOccurs="1" name="UserID" nillable="true" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="SpecialType">
        <xs:sequence>
          <xs:element minOccurs="1" name="MyX" nillable="false" type="xs:float"/>
          <xs:element minOccurs="1" name="MyY" nillable="false" type="xs:float"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="MyResponseMethod2Type">
        <xs:sequence>
          <xs:element maxOccurs="unbounded" minOccurs="0" name="Method2" nillable="true" type="java:Method2Type" xmlns:java="java:com.thisprogram.beans"/>
          <xs:element minOccurs="1" name="RequestId" nillable="true" type="xs:string"/>
          <xs:element minOccurs="1" name="TimeStamp" nillable="true" type="xs:string"/>
          <xs:element minOccurs="1" name="UserID" nillable="true" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="Method2Type">
        <xs:sequence>
          <xs:element minOccurs="1" name="FredToNext" nillable="true" type="xs:string"/>
          <xs:element minOccurs="1" name="AnotherVariable2" nillable="true" type="xs:string"/>
          <xs:element minOccurs="1" name="Id" nillable="true" type="xs:string"/>
          <xs:element minOccurs="1" name="MyX" nillable="false" type="xs:float"/>
          <xs:element minOccurs="1" name="MyY" nillable="false" type="xs:float"/>
          <xs:element minOccurs="1" name="Method2Image" nillable="true" type="java:ImageType" xmlns:java="java:com.thisprogram.beans"/>
          <xs:element minOccurs="1" name="Method2Text" nillable="true" type="xs:string"/>
          <xs:element minOccurs="1" name="TimeToNext" nillable="true" type="xs:string"/>
          <xs:element minOccurs="1" name="Sillytype" nillable="true" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </xs:schema>
  </types>
  <message name="BEAExampleMethod2">
    <part element="s0:BEAExampleMethod2" name="parameters"/>
  </message>
  <message name="BEAExampleMethod2Response">
    <part element="s0:BEAExampleMethod2Response" name="parameters"/>
  </message>
  <message name="BEAExampleMethod1">
    <part element="s0:BEAExampleMethod1" name="parameters"/>
  </message>
  <message name="BEAExampleMethod1Response">
    <part element="s0:BEAExampleMethod1Response" name="parameters"/>
  </message>
  <portType name="BEAExamplePortType">
    <operation name="BEAExampleMethod2" parameterOrder="parameters">
      <input message="s0:BEAExampleMethod2"/>
      <output message="s0:BEAExampleMethod2Response"/>
    </operation>
    <operation name="BEAExampleMethod1" parameterOrder="parameters">
      <input message="s0:BEAExampleMethod1"/>
      <output message="s0:BEAExampleMethod1Response"/>
    </operation>
  </portType>
  <binding name="BEAExampleServiceSoapBinding" type="s0:BEAExamplePortType">
    <s1:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="BEAExampleMethod2">
      <s1:operation soapAction="" style="document"/>
      <input>
        <s1:body parts="parameters" use="literal"/>
      </input>
      <output>
        <s1:body parts="parameters" use="literal"/>
      </output>
    </operation>
    <operation name="BEAExampleMethod1">
      <s1:operation soapAction="" style="document"/>
      <input>
        <s1:body parts="parameters" use="literal"/>
      </input>
      <output>
        <s1:body parts="parameters" use="literal"/>
      </output>
    </operation>
  </binding>
  <service name="BEAExampleService">
    <port binding="s0:BEAExampleServiceSoapBinding" name="BEAExampleServicePort">
      <s1:address location="http://localhost:7001/ThisApplication/BEAExampleService"/>
    </port>
  </service>
</definitions>

Reply via email to