Forum Stats

  • 3,769,471 Users
  • 2,252,969 Discussions
  • 7,875,044 Comments

Discussions

Failure to invoke a web service

644532
644532 Member Posts: 5
edited Sep 12, 2008 1:07PM in SOA Suite Discusssions
I have built an extremely simple BPEL flow. It involves a file adapter and a partner link. The file adapter reads the file's contents and uses one of the items as a parameter to invoke a web service.

The file gets read fine and from the BPEL console, I can see that the task was kicked off with good data. However, the web service invocation fails. Here's what it says:

<messages><input><isLocalIV><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="parameters"><isLocalElement xmlns="http://webservice.ibehavior.com/types/">
<fileId>23073</fileId>
</isLocalElement>
</part></isLocalIV></input><fault><remoteFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>exception on JaxRpc invoke: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: For input string: ""</summary>
</part></remoteFault></fault></messages>

I'm apparently failing to invoke my web service. So, my question is:

What's the most likely cause of this?

Thanks in advance for your help.

Answers

  • Hi,

    it looks like the message that you are sending is not correct. This could have different causes.

    - Check first if you can invoke the webserivce giving a correct set of data. (if this works correct the service is running correctly, no problem here)
    - Then fill the variable that you are sendign to this webservice with the same variables as your test and run the bpel. (if this works the bpel can communicate with the service)
    - Now parse the data from the file adapter into the input variable of the service and check if this works. (if this works you are done ;-) )

    If the second stap works but the third not check if the elements are of the correct namespace. This can be a easy mistake.

    -Theo
    Theo (IT-eye)
  • 522026
    522026 Member Posts: 1,220
    Hi,

    if you can show your XSD here and the input message, it would be easy to see, where the error is....
  • 644532
    644532 Member Posts: 5
    edited Sep 12, 2008 12:40PM
    I can invoke my web service using the URL http://<machineName>:8001/wls_utc/?wsdlUrl=http://<machineName>:8001/DataAcquisition-WS2-context-root/DataAcqWSSoapHttpPort?WSDL and invoke the individual exposed methods with no issue. I can provide any argument I want and the web service gets invoked. So it seems like the issue may be in a different area.

    Here's my input message for BPEL:

    <?xml version="1.0" encoding="UTF-8" ?>
    - <FileReceiptRequest xmlns="http://TargetNamespace.com/TaskInitiator">
    <fileId>23073</fileId>
    <memberCode>BODAD</memberCode>
    <serverName>grayspeak</serverName>
    <serverPath>'/data01/ftp-mirror/Archive/BODAD/2008/09/boden.zip_754520'</serverPath>
    <fileSize>7451361</fileSize>
    <receivedDate>1221003320000</receivedDate>
    </FileReceiptRequest>

    Here's my xsd from which it is using the FileReceiptRequest element:

    <?xml version="1.0" encoding="UTF-8" ?>

    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
    xmlns:tns="http://TargetNamespace.com/TaskInitiator"
    targetNamespace="http://TargetNamespace.com/TaskInitiator"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"

    nxsd:version="NXSD"
    nxsd:stream="chars"
    nxsd:encoding="ASCII"
    >


    <xsd:element name="FileReceiptRequest">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="fileId" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" />
    <xsd:element name="memberCode" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" />
    <xsd:element name="serverName" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" />
    <xsd:element name="serverPath" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" />
    <xsd:element name="fileSize" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" />
    <xsd:element name="receivedDate" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="FileReceiptResponse">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="result" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>

    Here is my WSDL for the web service:

    <?xml version="1.0" encoding="utf-8" ?>
    - <s0:definitions name="DataAcqWS" targetNamespace="http://webservice.ibehavior.com/" xmlns="" xmlns:s0="http://schemas.xmlsoap.org/wsdl/" xmlns:s1="http://webservice.ibehavior.com/types/" xmlns:s2="http://webservice.ibehavior.com/" xmlns:s3="http://schemas.xmlsoap.org/wsdl/soap/">
    - <s0:types>
    - <xsd:schema elementFormDefault="qualified" targetNamespace="http://webservice.ibehavior.com/types/" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://webservice.ibehavior.com/types/" xmlns:tns0="http://webservice.ibehavior.com/types/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    - <xsd:element name="cleanAddressElement">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="fileId" type="int" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="cleanAddressResponseElement">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="result" nillable="true" type="string" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="convertFileElement">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="fileId" type="int" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="convertFileResponseElement">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="result" nillable="true" type="string" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="dwUpdateElement">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="groupId" type="int" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="dwUpdateResponseElement">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="result" nillable="true" type="string" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="finishWorkElement">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="groupId" type="int" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="finishWorkResponseElement">
    - <xsd:complexType>
    <xsd:sequence />
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="getConvertedGroupIdElement">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="fileId" type="int" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="getConvertedGroupIdResponseElement">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="result" nillable="true" type="string" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="getNameAddressFileIdElement">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="parentFileId" type="int" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="getNameAddressFileIdResponseElement">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="result" nillable="true" type="string" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="getStatusElement">
    - <xsd:complexType>
    <xsd:sequence />
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="getStatusResponseElement">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="result" nillable="true" type="string" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="isLocalElement">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="fileId" type="int" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="isLocalResponseElement">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="result" nillable="true" type="string" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="matchBackElement">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="groupId" type="int" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="matchBackResponseElement">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="result" nillable="true" type="string" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="processRemoteFileElement">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="fileId" type="int" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="processRemoteFileResponseElement">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="result" nillable="true" type="string" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="reloadConfigFileElement">
    - <xsd:complexType>
    <xsd:sequence />
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="reloadConfigFileResponseElement">
    - <xsd:complexType>
    <xsd:sequence />
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="stageTableLoadElement">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="groupId" type="int" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    - <xsd:element name="stageTableLoadResponseElement">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="result" nillable="true" type="string" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    </s0:types>
    - <s0:message name="DataAcqWS_cleanAddress">
    <s0:part element="s1:cleanAddressElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_cleanAddressResponse">
    <s0:part element="s1:cleanAddressResponseElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_convertFile">
    <s0:part element="s1:convertFileElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_convertFileResponse">
    <s0:part element="s1:convertFileResponseElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_dwUpdate">
    <s0:part element="s1:dwUpdateElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_dwUpdateResponse">
    <s0:part element="s1:dwUpdateResponseElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_finishWork">
    <s0:part element="s1:finishWorkElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_finishWorkResponse">
    <s0:part element="s1:finishWorkResponseElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_getConvertedGroupId">
    <s0:part element="s1:getConvertedGroupIdElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_getConvertedGroupIdResponse">
    <s0:part element="s1:getConvertedGroupIdResponseElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_getNameAddressFileId">
    <s0:part element="s1:getNameAddressFileIdElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_getNameAddressFileIdResponse">
    <s0:part element="s1:getNameAddressFileIdResponseElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_getStatus">
    <s0:part element="s1:getStatusElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_getStatusResponse">
    <s0:part element="s1:getStatusResponseElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_isLocal">
    <s0:part element="s1:isLocalElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_isLocalResponse">
    <s0:part element="s1:isLocalResponseElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_matchBack">
    <s0:part element="s1:matchBackElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_matchBackResponse">
    <s0:part element="s1:matchBackResponseElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_processRemoteFile">
    <s0:part element="s1:processRemoteFileElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_processRemoteFileResponse">
    <s0:part element="s1:processRemoteFileResponseElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_reloadConfigFile">
    <s0:part element="s1:reloadConfigFileElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_reloadConfigFileResponse">
    <s0:part element="s1:reloadConfigFileResponseElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_stageTableLoad">
    <s0:part element="s1:stageTableLoadElement" name="parameters" />
    </s0:message>
    - <s0:message name="DataAcqWS_stageTableLoadResponse">
    <s0:part element="s1:stageTableLoadResponseElement" name="parameters" />
    </s0:message>
    - <s0:portType name="DataAcqWS">
    - <s0:operation name="cleanAddress">
    <s0:input message="s2:DataAcqWS_cleanAddress" />
    <s0:output message="s2:DataAcqWS_cleanAddressResponse" />
    </s0:operation>
    - <s0:operation name="convertFile">
    <s0:input message="s2:DataAcqWS_convertFile" />
    <s0:output message="s2:DataAcqWS_convertFileResponse" />
    </s0:operation>
    - <s0:operation name="dwUpdate">
    <s0:input message="s2:DataAcqWS_dwUpdate" />
    <s0:output message="s2:DataAcqWS_dwUpdateResponse" />
    </s0:operation>
    - <s0:operation name="finishWork">
    <s0:input message="s2:DataAcqWS_finishWork" />
    <s0:output message="s2:DataAcqWS_finishWorkResponse" />
    </s0:operation>
    - <s0:operation name="getConvertedGroupId">
    <s0:input message="s2:DataAcqWS_getConvertedGroupId" />
    <s0:output message="s2:DataAcqWS_getConvertedGroupIdResponse" />
    </s0:operation>
    - <s0:operation name="getNameAddressFileId">
    <s0:input message="s2:DataAcqWS_getNameAddressFileId" />
    <s0:output message="s2:DataAcqWS_getNameAddressFileIdResponse" />
    </s0:operation>
    - <s0:operation name="getStatus">
    <s0:input message="s2:DataAcqWS_getStatus" />
    <s0:output message="s2:DataAcqWS_getStatusResponse" />
    </s0:operation>
    - <s0:operation name="isLocal">
    <s0:input message="s2:DataAcqWS_isLocal" />
    <s0:output message="s2:DataAcqWS_isLocalResponse" />
    </s0:operation>
    - <s0:operation name="matchBack">
    <s0:input message="s2:DataAcqWS_matchBack" />
    <s0:output message="s2:DataAcqWS_matchBackResponse" />
    </s0:operation>
    - <s0:operation name="processRemoteFile">
    <s0:input message="s2:DataAcqWS_processRemoteFile" />
    <s0:output message="s2:DataAcqWS_processRemoteFileResponse" />
    </s0:operation>
    - <s0:operation name="reloadConfigFile">
    <s0:input message="s2:DataAcqWS_reloadConfigFile" />
    <s0:output message="s2:DataAcqWS_reloadConfigFileResponse" />
    </s0:operation>
    - <s0:operation name="stageTableLoad">
    <s0:input message="s2:DataAcqWS_stageTableLoad" />
    <s0:output message="s2:DataAcqWS_stageTableLoadResponse" />
    </s0:operation>
    </s0:portType>
    - <s0:binding name="DataAcqWSSoapHttp" type="s2:DataAcqWS">
    <s3:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    - <s0:operation name="cleanAddress">
    <s3:operation soapAction="http://webservice.ibehavior.com//cleanAddress" />
    - <s0:input>
    <s3:body use="literal" />
    </s0:input>
    - <s0:output>
    <s3:body use="literal" />
    </s0:output>
    </s0:operation>
    - <s0:operation name="convertFile">
    <s3:operation soapAction="http://webservice.ibehavior.com//convertFile" />
    - <s0:input>
    <s3:body use="literal" />
    </s0:input>
    - <s0:output>
    <s3:body use="literal" />
    </s0:output>
    </s0:operation>
    - <s0:operation name="dwUpdate">
    <s3:operation soapAction="http://webservice.ibehavior.com//dwUpdate" />
    - <s0:input>
    <s3:body use="literal" />
    </s0:input>
    - <s0:output>
    <s3:body use="literal" />
    </s0:output>
    </s0:operation>
    - <s0:operation name="finishWork">
    <s3:operation soapAction="http://webservice.ibehavior.com//finishWork" />
    - <s0:input>
    <s3:body use="literal" />
    </s0:input>
    - <s0:output>
    <s3:body use="literal" />
    </s0:output>
    </s0:operation>
    - <s0:operation name="getConvertedGroupId">
    <s3:operation soapAction="http://webservice.ibehavior.com//getConvertedGroupId" />
    - <s0:input>
    <s3:body use="literal" />
    </s0:input>
    - <s0:output>
    <s3:body use="literal" />
    </s0:output>
    </s0:operation>
    - <s0:operation name="getNameAddressFileId">
    <s3:operation soapAction="http://webservice.ibehavior.com//getNameAddressFileId" />
    - <s0:input>
    <s3:body use="literal" />
    </s0:input>
    - <s0:output>
    <s3:body use="literal" />
    </s0:output>
    </s0:operation>
    - <s0:operation name="getStatus">
    <s3:operation soapAction="http://webservice.ibehavior.com//getStatus" />
    - <s0:input>
    <s3:body use="literal" />
    </s0:input>
    - <s0:output>
    <s3:body use="literal" />
    </s0:output>
    </s0:operation>
    - <s0:operation name="isLocal">
    <s3:operation soapAction="http://webservice.ibehavior.com//isLocal" />
    - <s0:input>
    <s3:body use="literal" />
    </s0:input>
    - <s0:output>
    <s3:body use="literal" />
    </s0:output>
    </s0:operation>
    - <s0:operation name="matchBack">
    <s3:operation soapAction="http://webservice.ibehavior.com//matchBack" />
    - <s0:input>
    <s3:body use="literal" />
    </s0:input>
    - <s0:output>
    <s3:body use="literal" />
    </s0:output>
    </s0:operation>
    - <s0:operation name="processRemoteFile">
    <s3:operation soapAction="http://webservice.ibehavior.com//processRemoteFile" />
    - <s0:input>
    <s3:body use="literal" />
    </s0:input>
    - <s0:output>
    <s3:body use="literal" />
    </s0:output>
    </s0:operation>
    - <s0:operation name="reloadConfigFile">
    <s3:operation soapAction="http://webservice.ibehavior.com//reloadConfigFile" />
    - <s0:input>
    <s3:body use="literal" />
    </s0:input>
    - <s0:output>
    <s3:body use="literal" />
    </s0:output>
    </s0:operation>
    - <s0:operation name="stageTableLoad">
    <s3:operation soapAction="http://webservice.ibehavior.com//stageTableLoad" />
    - <s0:input>
    <s3:body use="literal" />
    </s0:input>
    - <s0:output>
    <s3:body use="literal" />
    </s0:output>
    </s0:operation>
    </s0:binding>
    - <s0:service name="DataAcqWS">
    - <s0:port binding="s2:DataAcqWSSoapHttp" name="DataAcqWSSoapHttpPort">
    <s3:address location="http://192.168.200.21:8001/DataAcquisition-WS2-context-root/DataAcqWSSoapHttpPort" />
    </s0:port>
    </s0:service>
    </s0:definitions>

    Edited by: dmyers on Sep 12, 2008 10:37 AM
  • 644532
    644532 Member Posts: 5
    edited Sep 12, 2008 1:07PM
    I responded with the xsd for my BPEL input, the BPEL input, the WSDL for my web service, and the input being handed to the web service.

    I can see in the flow (BPEL Console) that the task gets initiated (which is where snagged the BPEL input). I can see the initialization for the call to the web service (which is where I snagged the web service request) and the fault on the call to the web service (which is where I snagged the failure information)

    I'll also add that this web service worked fine against OC4J. Similar BPEL projects also had no problem invoking my web service when I was using OC4J. I constructed a much simpler BPEL project just to help get things all working.

    Edited by: dmyers on Sep 12, 2008 11:05 AM
This discussion has been closed.