I've tried to do an assign from a complex type to another variable, and this
 works when the complex type has one subtype.

But my problem is to do this with a complex type that have several subtype. I
 have in my wsdl this complex type:

<xsd:complexType name="helloType">
    <xsd:sequence>
        <xsd:element name="hello1" type="xsd:string"/>
        <xsd:element name="hello2" type="xsd:string"/>
    </xsd:sequence>
</xsd:complexType>

and the message:

<wsdl:message name="HelloMessage">
    <wsdl:part name="TestPart" type="nsxsd:helloType"/>
</wsdl:message>

In my BPEL, I have these variable

<variable name="myVar" messageType="test:HelloMessage"/>
<variable name="tmpVar1" type="xsd:string"/>
<variable name="tmpVar2" type="xsd:string"/>

and I want to do these assign:

<copy>
    <from>$myVar.TestPart/nsxsd:hello1</from>
    <to variable="tmpVar1"/>
</copy>
<copy>
    <from>$myVar.TestPart/nsxsd:hello2</from>
    <to variable="tmpVar2"/>
</copy>

But this does'nt work. I obtain a message fault:

<soapenv:Body>
    <soapenv:Fault>
        <faultcode>soapenv:Server</faultcode>
        <faultstring xmlns:axis2ns1="http://docs.oasis
 open.org/wsbpel/2.0/proces /executable"> axis2ns1:selectionFailure
        </faultstring>
        <detail />
    </soapenv:Fault>
</soapenv:Body>

What's wrong in my bpel or wsdl? The complete bpel and wsdl are attached. I
 have also attached a soap message that i send to the process to test it.

--
Thanks.

<?xml version="1.0" encoding="utf-8" ?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~    http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->

<wsdl:definitions 
    targetNamespace="http://ode/bpel/unit-test.wsdl";
    xmlns="http://schemas.xmlsoap.org/wsdl/";
    xmlns:tns="http://ode/bpel/unit-test.wsdl";
        xmlns:nsxsd="http://ode/bpel/unit-test.wsdl/xsd";
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema";
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
    xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype";>
        
        <wsdl:types>
        <xsd:schema targetNamespace="http://ode/bpel/unit-test.wsdl/xsd";>
                        <xsd:complexType name="helloType">
                                <xsd:sequence>
                                        <xsd:element name="hello1" 
type="xsd:string"/>
                                        <xsd:element name="hello2" 
type="xsd:string"/>
                                </xsd:sequence>
                        </xsd:complexType>
        </xsd:schema>
        </wsdl:types>
    
    <wsdl:message name="HelloMessage">
        <wsdl:part name="TestPart" type="nsxsd:helloType"/>
    </wsdl:message>
    
    <wsdl:portType name="HelloPortType">
        <wsdl:operation name="hello">
            <wsdl:input message="tns:HelloMessage" name="TestIn"/>
            <wsdl:output message="tns:HelloMessage" name="TestOut"/>
        </wsdl:operation>    
    </wsdl:portType>
    
     <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
        <soap:binding style="rpc" 
transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="hello">
            <soap:operation soapAction="" style="rpc"/>
            <wsdl:input>
                <soap:body
                    namespace="http://ode/bpel/unit-test.wsdl";
                    use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body
                    namespace="http://ode/bpel/unit-test.wsdl"; 
                    use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    
        <wsdl:service name="HelloService">
                <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
                <soap:address 
location="http://localhost:8080/ode/processes/helloWorld"/>
                </wsdl:port>
    </wsdl:service>
    
   <plnk:partnerLinkType name="HelloPartnerLinkType">
       <plnk:role name="hello_provider" portType="tns:HelloPortType"/>
   </plnk:partnerLinkType>
</wsdl:definitions>

Reply via email to