You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by LeeCK <le...@yahoo.com> on 2009/09/10 07:29:15 UTC

Invoke's outputVariable doesn't comply with defined schema

Hi,

Will ODE checks the response soap message against the schema in WSDL before
writing it into the outputVariable? 

I've trouble getting the outputVariable to comply with the defined schema in
WSDL. The invoke seems to ignored the schema defined in WSDL and write
whatever response it gets into the outputVariable (even soapFault!!).

I was expecting the example below to throw an error because the response
from endpoint doesn't match the schema defined in WSDL. But strangely, no
error is thrown and the response from endpoint is copy into the
$outputVariable.parameters! Why is that??

WSDL:
  <wsdl:types>
    <s:schema/>
      <s:element name="GetGroupInfoResponse" type="s:string"/>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="GetGroupInfoSoapOut">
    <wsdl:part name="parameters" element="tns:GetGroupInfoResponse" />
  </wsdl:message> 
  <wsdl:portType name="UserGroupSoap">
    <wsdl:operation name="GetGroupInfo">
      <wsdl:input message="tns:GetGroupInfoSoapIn" />
      <wsdl:output message="tns:GetGroupInfoSoapOut" />
    </wsdl:operation>
  </wsdl:portType>

BPEL script:
    <bpel:variables>
        <bpel:variable name="ProviderPLResponse"
messageType="ns0:GetGroupInfoSoapOut"/>
        <bpel:variable name="ProviderPLRequest"
messageType="ns0:GetGroupInfoSoapIn"/>      
    </bpel:variables>
    <bpel:invoke name="Invoke" 
                      partnerLink="ProviderPL" 
                      operation="GetGroupInfo" 
                      portType="ns0:UserGroupSoap" 
                      inputVariable="ProviderPLRequest" 
                      outputVariable="ProviderPLResponse"/>

Response received from external endpoint:
<?xml version="1.0" encoding="utf-8"?>
   <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <soap:Body>
         <GetGroupInfoResponse
xmlns="http://schemas.microsoft.com/sharepoint/soap/directory/">
            <GetGroupInfoResult>
               <GetGroupInfo>
                  <Group ID="7" 
                    Name="MyFirstGroup" 
                    Description="" 
                    OwnerID="1073741823" 
                    OwnerIsUser="True" />
               </GetGroupInfo>
            </GetGroupInfoResult>
         </GetGroupInfoResponse>
      </soap:Body>
   </soap:Envelope>


-- 
View this message in context: http://www.nabble.com/Invoke%27s-outputVariable-doesn%27t-comply-with-defined-schema-tp25377513p25377513.html
Sent from the Apache Ode User mailing list archive at Nabble.com.


Re: Invoke's outputVariable doesn't comply with defined schema

Posted by LeeCK <le...@yahoo.com>.
Response in TCPMon:
HTTP/1.1 500 Internal Server Error
Date: Fri, 11 Sep 2009 04:13:30 GMT
Server: Microsoft-IIS/6.0
MicrosoftSharePointTeamServices: 12.0.0.6039
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 684

<?xml version="1.0" encoding="utf-8"?>
   <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <soap:Body>
         <soap:Fault>
            <soap:Code>
               <soap:Value>soap:Receiver</soap:Value>
            </soap:Code>
            <soap:Reason>
               <soap:Text xml:lang="en">Exception of type
'Microsoft.SharePoint.SoapServer.SoapServerException' was
thrown.</soap:Text>
            </soap:Reason>
            <detail>
               <errorstring
xmlns="http://schemas.microsoft.com/sharepoint/soap/">Group cannot be
found.</errorstring>
               <errorcode
xmlns="http://schemas.microsoft.com/sharepoint/soap/">0x80131600</errorcode>
            </detail>
         </soap:Fault>
      </soap:Body>
   </soap:Envelope>

>From the log:
14:13:10,101 | DEBUG | pool-5-thread-47 | BpelRuntimeContextImpl   |
.engine.BpelRuntimeContextImpl  976 | Triggering response
14:13:10,101 | DEBUG | pool-5-thread-47 | ScopeFrame               |
he.ode.bpel.runtime.ScopeFrame  237 | Initialize variable: name={Variable
__PROCESS_SCOPE:Moss.ProviderPLResponse:OMessageVarType#14} value=<?xml
version="1.0" encoding="UTF-8"?>
<soap:Fault
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Code><soap:Value>soap:Receiver</soap:Value></soap:Code><soap:Reason><soap:Text
xml:lang="en">Exception of type
'Microsoft.SharePoint.SoapServer.SoapServerException' was
thrown.</soap:Text></soap:Reason><detail><errorstring
xmlns="http://schemas.microsoft.com/sharepoint/soap/">Group cannot be
found.</errorstring><errorcode
xmlns="http://schemas.microsoft.com/sharepoint/soap/">0x80131600</errorcode></detail></soap:Fault>

I've also attached the bpel scripts and wsdls. 

Thanks.

http://www.nabble.com/file/p25394820/resources.zip resources.zip 
-- 
View this message in context: http://www.nabble.com/Invoke%27s-outputVariable-doesn%27t-comply-with-defined-schema-tp25377513p25394820.html
Sent from the Apache Ode User mailing list archive at Nabble.com.


Re: Invoke's outputVariable doesn't comply with defined schema

Posted by Alex Boisvert <bo...@intalio.com>.
I would need to see the transport-level message.   A SOAP envelope in a
variable may indicate that your SOAP fault was wrapped inside a standard
SOAP body.  Very strange indeed.

alex


On Thu, Sep 10, 2009 at 4:31 PM, LeeCK <le...@yahoo.com> wrote:

>
> Hi Alex,
>
> This is the soap fault that gets written into outputVariable. Is this soap
> fault message wrong?
>    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>      <soap:Body>
>          <soap:Fault>
>            <soap:Code>
>               <soap:Value>soap:Receiver</soap:Value>
>            </soap:Code>
>            <soap:Reason>
>               <soap:Text xml:lang="en">Exception of type
> 'Microsoft.SharePoint.SoapServer.SoapServerException' was
> thrown.</soap:Text>
>            </soap:Reason>
>            <detail>
>               <errorstring
> xmlns="http://schemas.microsoft.com/sharepoint/soap/">Group cannot be
> found.</errorstring>
>               <errorcode
> xmlns="http://schemas.microsoft.com/sharepoint/soap/
> ">0x80131600</errorcode>
>            </detail>
>         </soap:Fault>
>      </soap:Body>
>   </soap:Envelope>
>
> Thanks,
> Lee
>
>
> Alex Boisvert-3 wrote:
> >
> > On Wed, Sep 9, 2009 at 10:29 PM, LeeCK <le...@yahoo.com> wrote:
> >
> >> Will ODE checks the response soap message against the schema in WSDL
> >> before
> >> writing it into the outputVariable?
> >>
> >
> > No.
> >
> >
> >> I've trouble getting the outputVariable to comply with the defined
> schema
> >> in
> >> WSDL. The invoke seems to ignored the schema defined in WSDL and write
> >> whatever response it gets into the outputVariable (even soapFault!!).
> >>
> >
> > This is quite unusual and probably indicate a failure to respect the SOAP
> > protocol on the part of the target service.  Axis2 should detect SOAP
> > faults
> > and ODE should either suspend the process (activity recovery) or go into
> > exception handling in the process.
> >
> > alex
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Invoke%27s-outputVariable-doesn%27t-comply-with-defined-schema-tp25377513p25392682.html
> Sent from the Apache Ode User mailing list archive at Nabble.com.
>
>

Re: Invoke's outputVariable doesn't comply with defined schema

Posted by LeeCK <le...@yahoo.com>.
Hi Alex,

This is the soap fault that gets written into outputVariable. Is this soap
fault message wrong?
   <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
      <soap:Body> 
         <soap:Fault> 
            <soap:Code> 
               <soap:Value>soap:Receiver</soap:Value> 
            </soap:Code> 
            <soap:Reason> 
               <soap:Text xml:lang="en">Exception of type
'Microsoft.SharePoint.SoapServer.SoapServerException' was
thrown.</soap:Text> 
            </soap:Reason> 
            <detail> 
               <errorstring
xmlns="http://schemas.microsoft.com/sharepoint/soap/">Group cannot be
found.</errorstring> 
               <errorcode
xmlns="http://schemas.microsoft.com/sharepoint/soap/">0x80131600</errorcode> 
            </detail> 
         </soap:Fault> 
      </soap:Body> 
   </soap:Envelope> 

Thanks,
Lee 


Alex Boisvert-3 wrote:
> 
> On Wed, Sep 9, 2009 at 10:29 PM, LeeCK <le...@yahoo.com> wrote:
> 
>> Will ODE checks the response soap message against the schema in WSDL
>> before
>> writing it into the outputVariable?
>>
> 
> No.
> 
> 
>> I've trouble getting the outputVariable to comply with the defined schema
>> in
>> WSDL. The invoke seems to ignored the schema defined in WSDL and write
>> whatever response it gets into the outputVariable (even soapFault!!).
>>
> 
> This is quite unusual and probably indicate a failure to respect the SOAP
> protocol on the part of the target service.  Axis2 should detect SOAP
> faults
> and ODE should either suspend the process (activity recovery) or go into
> exception handling in the process.
> 
> alex
> 
> 

-- 
View this message in context: http://www.nabble.com/Invoke%27s-outputVariable-doesn%27t-comply-with-defined-schema-tp25377513p25392682.html
Sent from the Apache Ode User mailing list archive at Nabble.com.


Re: Invoke's outputVariable doesn't comply with defined schema

Posted by Alex Boisvert <bo...@intalio.com>.
On Wed, Sep 9, 2009 at 10:29 PM, LeeCK <le...@yahoo.com> wrote:

> Will ODE checks the response soap message against the schema in WSDL before
> writing it into the outputVariable?
>

No.


> I've trouble getting the outputVariable to comply with the defined schema
> in
> WSDL. The invoke seems to ignored the schema defined in WSDL and write
> whatever response it gets into the outputVariable (even soapFault!!).
>

This is quite unusual and probably indicate a failure to respect the SOAP
protocol on the part of the target service.  Axis2 should detect SOAP faults
and ODE should either suspend the process (activity recovery) or go into
exception handling in the process.

alex