Skip to main content

BPEL Process Soap Client Error

1 reply [Last post]
Joined: 2009-08-27

Here is what I attempted to do:

I created a BPEL process using a user defined client interface, which was a Web service generated with Apache CXF (I created an interface containing a method that took three Strings and returns a String, generated a WSDL file with java2ws and then generated the classes using wsdl2java. I implemented the interface and then I created a WAR archive and deployed it with JBOSS).

I created the BPEL process and it works fine in the BPEL console.

I took the wsdl file given in the BPEL console for my process and generated java classes using wsdl2java.

In Eclipse I set the program arguments to the wsdl URL given in the BPEL console and executed the client and it generated the following error:

27.08.2009 22:35:20 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now Could not send Message.
Exception in thread "main" Could not send Message.
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
at $Proxy38.process(Unknown Source)
at clientinterface.TranslationClientInterface_TranslationClientInterface_Client.main(
Caused by: org.apache.cxf.interceptor.Fault: Could not send Message.
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
at org.apache.cxf.endpoint.ClientImpl.invoke(
at org.apache.cxf.endpoint.ClientImpl.invoke(
at org.apache.cxf.endpoint.ClientImpl.invoke(
at org.apache.cxf.frontend.ClientProxy.invokeSync(
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
... 2 more
Caused by: /TranslationClientInterface
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(
at org.apache.cxf.transport.AbstractConduit.close(
at org.apache.cxf.transport.http.HTTPConduit.close(
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(
... 8 more

This is the client class:

import javax.xml.namespace.QName;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.xml.bind.annotation.XmlSeeAlso;

* This class was generated by Apache CXF 2.1.4
* Thu Aug 27 22:24:25 EEST 2009
* Generated source version: 2.1.4

public final class TranslationClientInterface_TranslationClientInterface_Client {

private static final QName SERVICE_NAME = new QName("http://clientinterface", "TranslationClientInterfaceService");

private TranslationClientInterface_TranslationClientInterface_Client() {

public static void main(String args[]) throws Exception {
URL wsdlURL = TranslationClientInterfaceService.WSDL_LOCATION;
if (args.length > 0) {
File wsdlFile = new File(args[0]);
try {
if (wsdlFile.exists()) {
wsdlURL = wsdlFile.toURI().toURL();
} else {
wsdlURL = new URL(args[0]);
} catch (MalformedURLException e) {

TranslationClientInterfaceService ss = new TranslationClientInterfaceService(wsdlURL, SERVICE_NAME);
TranslationClientInterface port = ss.getTranslationClientInterface();

System.out.println("Invoking process...");
java.lang.String _process_senderNr = "1234567890";
java.lang.String _process_receiverNr = "7895140235";
java.lang.String _process_message = "tr:en:Je suis un garcon";
java.lang.String _process__return = port.process(_process_senderNr, _process_receiverNr, _process_message);
System.out.println("process.result=" + _process__return);




I couldn't find any link in English about this problem and I would very much appreciate your help.


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2009-08-27

I found another way to write a Soap Client. Here it is:

- [u]the Java class[/u]:

import java.rmi.RemoteException;
import java.util.Map;
import java.util.Properties;
import org.w3c.dom.Element;
import oracle.xml.parser.v2.XMLElement;

public class SoapClientInvocation {

private static final String PROPERTIES_FILE="";

public String invokeBpelProcess(String senderNr, String receiverNr, String message) throws SoapClientException
String bpelResponse=null;
Properties properties=new java.util.Properties();
FileInputStream in = new FileInputStream(new File(PROPERTIES_FILE));

String requestXml="[b]the input parameters given in xml format (copy it from the BPEL Console)[/b]"

Locator locator=new Locator(properties.getProperty("domain"),properties.getProperty(""),properties);
IDeliveryService deliveryService=(IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME);

NormalizedMessage nm=new NormalizedMessage();
[b]/* if you created an [u]empty[/u] BPEL process you do not have to modify anything
if you created a [u]synchronuous[/u] BPEL process you must write [i]payload[/i] instead of [i]parameters[/i] */[/b]
NormalizedMessage response=deliveryService.request("[b]The name of your BPEL process[/b]","[b]The name of the function used by the BPEL process (for a [u]synchronuous[/u] BPEL process the function name is [i]process[/i])[/b]",nm);
Map payload=response.getPayload();

XMLElement xmlResponse=(XMLElement)payload.get("[b]parameters[/b]");
[b]/*again write [i]payload[/i] instead of [i]parameters[/i] for [u]synchronuos[/u] BPEL processes*/[/b]
Element partElement=(Element)xmlResponse.getChildrenByTagName("[b]The name of the tag in the response given by the BPEL process (for [u]synchronuous[/u] processes it is [i]result[/i])[/b]").item(0);

}catch (ServerException se){
throw new SoapClientException(se.getMessage());
} catch (RemoteException re) {
throw new SoapClientException(re.getMessage());
} catch (IOException ioe) {
throw new SoapClientException(ioe.getMessage());
String responseMessage=ReturnCode.getMessage(bpelResponse);
return responseMessage;

- [u]the .properties file[/u]:


[b][/b] - address with which you connect to the BPEL Console (not necessarily localhost)
[b]6003[/b] - it is always this port, unless you explicitly modified it
[b]oc4j_soa[/b] - to find out if this fits your settings, go to the Application Server Controle in Oracle SOA Suit and verify the OC4J instance under the Groups section

This .properties file must be copied in $JBOSS_HOME/bin when you will deploy the service.

- [u]you'll also need the following .jar files[/u]: connector15.jar, ejb.jar, oc4j-internal.jar, optic.jar, orabpel.jar, orabpel-ant.jar, orabpel-boot.jar, orabpel-common.jar, orabpel-exts.jar, orabpel-thirdparty.jar, oracle_http_client.jar, orawsdl.jar, xmlparserv2.jar

You'll find these in different directories (usually in lib directories) where Oracle SOA Suite was installed or in JDeveloper.