Hi all,
I'm facing tjhe following problem:
I have defined a synchronous BPEL process, which internally communicates with one webservice.
The webservice is defined by the following WSDL (just the interessant part, not complete WSDL):
------------------------------------------------------------------------------------------------------------
<?xml version='1.0' encoding='UTF-8'?><wsdl
efinitions name="WsKonsu" targetNamespace="http://jwsbe2.noegkk.sozvers.at/" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://jwsbe2.noegkk.sozvers.at/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xs:schema *attributeFormDefault="unqualified" elementFormDefault="unqualified"* targetNamespace="http://jwsbe2.noegkk.sozvers.at/" xmlns:tns="http://jwsbe2.noegkk.sozvers.at/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="rqFiktiveVZ">
<xs:sequence>
<xs:element minOccurs="0" name="beginnwertDat" type="xs
ateTime" />
<xs:element minOccurs="0" name="endewertDat" type="xs
ateTime" />
<xs:element minOccurs="0" name="kontoid" type="xs:long" />
<xs:element minOccurs="0" name="mandantId" type="xs:string" />
<xs:element minOccurs="0" name="stichtag" type="xs
ateTime" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="rsFiktiveVZ">
<xs:sequence>
<xs:element minOccurs="0" name="isOk" type="xs:string" />
<xs:element minOccurs="0" name="meldungBean" type="tns:meldungBean" />
<xs:element minOccurs="0" name="vzgesamt" type="xs
ouble" />
<xs:element minOccurs="0" name="vztaeglich" type="xs
ouble" />
</xs:sequence>
</xs:complexType>
----------------------------------------------------------------------------------------------------------------------------------
The fact, that the elements are unqualified, forces me to use the same setting for all my schemas too.
Also, I have defined the following schema in my project, to define the types used by the webservice (copy-paste from the wsdl):
----------------------------------------------------------------------------------------------------------------------------------
WSKonsu.xsd:
===================
<xs:schema
elementFormDefault="unqualified"
attributeFormDefault="unqualified"
targetNamespace="http://jwsbe2.noegkk.sozvers.at/"
xmlns:tns="http://jwsbe2.noegkk.sozvers.at/"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- === VZ ============================================================ -->
<!-- VZ request type -->
<xs:complexType name="rqFiktiveVZ">
<xs:sequence>
<xs:element minOccurs="0" name="beginnwertDat" type="xs
ateTime" />
<xs:element minOccurs="0" name="endewertDat" type="xs
ateTime" />
<xs:element minOccurs="0" name="kontoid" type="xs:long" />
<xs:element minOccurs="0" name="mandantId" type="xs:string" />
<xs:element minOccurs="0" name="stichtag" type="xs
ateTime" />
</xs:sequence>
</xs:complexType>
<!-- VZ response type -->
<xs:complexType name="rsFiktiveVZ">
<xs:sequence>
<xs:element minOccurs="0" name="isOk" type="xs:string" />
<xs:element minOccurs="0" name="meldungBean" type="tns:meldungBean" />
<xs:element minOccurs="0" name="vzgesamt" type="xs
ouble" />
<xs:element minOccurs="0" name="vztaeglich" type="xs
ouble" />
</xs:sequence>
</xs:complexType>
------------------------------------------------------------------------------------------------------------------
Then, I have defined another schema, to define the types to be used by the BPEL process (the message is a bit different, the service can be internally called more than once, also the output can contain an array of the objects):
------------------------------------------------------------------------------------------------------------------
BPELWSKonsu.xsd:
===================
<xs:schema
elementFormDefault="unqualified"
attributeFormDefault="unqualified"
targetNamespace="http://sozvers.at/WSKonsu/DataTypes/"
xmlns:tns="http://sozvers.at/WSKonsu/DataTypes/"
xmlns:service="http://jwsbe2.noegkk.sozvers.at/"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://jwsbe2.noegkk.sozvers.at/" schemaLocation="WSKonsu.xsd"/>
<!-- === input/output elements ========================================= -->
<xs:element name="BPELWSConsuComplexIn">
<xs:complexType>
<xs:sequence>
<xs:element name="VZInData"
minOccurs="0"
maxOccurs="1"
nillable="true"
type="service:rqFiktiveVZ"
/>
<xs:element name="KontoInfoInData"
minOccurs="0"
maxOccurs="1"
nillable="true"
type="service:rqWjsKonsu"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="BPELWSConsuComplexOut">
<xs:complexType>
<xs:sequence>
<xs:element name="VZOutData"
minOccurs="0"
maxOccurs="unbounded"
nillable="true"
type="service:rsFiktiveVZ"
/>
<xs:element name="KontoInfoOutData"
minOccurs="0"
maxOccurs="unbounded"
nillable="true"
type="service:rsWjsKonsu"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
--------------------------------------------------------------------------------------------------------------
And finally, the input/output variables of the process are defined as follows (WSDL of the process)>
--------------------------------------------------------------------------------------------------------------
<definitions
name="WSKonsu_1_2"
targetNamespace="http://sozvers.at/WSKonsu"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:ns1="http://sozvers.at/WSKonsu/DataTypes/"
xmlns
lnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:client="http://sozvers.at/WSKonsu"
>
<types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" attributeFormDefault="unqualified"
xmlns:ns1="http://sozvers.at/WSKonsu/DataTypes/" xmlns
lnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:client="http://sozvers.at/WSKonsu">
<xs:import namespace="http://sozvers.at/WSKonsu/DataTypes/" schemaLocation="BPELWSKonsu.xsd"/>
</xs:schema>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified"
attributeFormDefault="unqualified" xmlns:ns1="http://sozvers.at/WSKonsu/DataTypes/"
xmlns
lnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:client="http://sozvers.at/WSKonsu">
<xs:import namespace="http://jwsbe2.noegkk.sozvers.at/" schemaLocation="WSKonsu.xsd"/>
</xs:schema>
</types>
<message name="WSKonsu_1_2RequestMessage">
<part name="payload" element="ns1:BPELWSConsuComplexIn"/>
</message>
<message name="WSKonsu_1_2ResponseMessage">
<part name="payload" element="ns1:BPELWSConsuComplexOut"/>
</message>
<portType name="WSKonsu_1_2">
<operation name="process">
<input message="client:WSKonsu_1_2RequestMessage"/>
<output message="client:WSKonsu_1_2ResponseMessage"/>
</operation>
</portType>
<plnk
artnerLinkType name="WSKonsu_1_2">
<plnk:role name="WSKonsu_1_2Provider">
<plnk
ortType name="client:WSKonsu_1_2"/>
</plnk:role>
</plnk
artnerLinkType>
</definitions>
----------------------------------------------------------------------------------------------------------
OK, now the actual problem:
========================
The output variable, as displayed by the BPEL console (flow/audit):
----------------------------------------------------------------
<outputVariable>
<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
<BPELWSConsuComplexOut xmlns="http://sozvers.at/WSKonsu/DataTypes/">
<VZOutData *xmlns=""*>
<isOk>NOK</isOk>
...
</VZOutData>
</BPELWSConsuComplexOut>
</part>
</outputVariable>
But, the
SOAP message contains:
------------------------------------------------------------------
<env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<BPELWSConsuComplexOut
xmlns="http://sozvers.at/WSKonsu/DataTypes/">
<VZOutData>
...
</VZOutData>
</BPELWSConsuComplexOut>
</env:Body>
</env:Envelope>
=============================================
Also, in the SOAP message the xmlns="" is removed and thus all parts have namespace
http://sozvers.at/WSKonsu/DataTypes/ as specified by the root element.
But, when I generate a WS client (i.e. in JDeveloper), the client assumes the subelements to have no namespace (xmlns="") and I obtain an exception:
unexpected element name: expected=VZOutData, actual={http://sozvers.at/WSKonsu/DataTypes/}VZOutData
All help will be appreciated!