You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by nancy <na...@daffodildb.com> on 2006/05/10 10:44:05 UTC

Use axis2 to call bpel

Yah I understand that marking message with Urgent won't help in getting
quick reply from others.Anyways,I want to send a SOAP Envelope in the way
that I don't need to manipulate the requested parameter (OMELEMENT) there to
get the parameters.

I tried it but with no success. Exception is coming:

Cannot find binding operation definition of soapAction '/orabpel' in
http://daff06:9700/orabpel/default/ProcessManager/1.0/ProcessManager.wsdl

My Request was:


My request was: 

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

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header />

<soapenv:Body>

<Process:initiateProcess
xmlns:Process="http://services.oracle.com/bpel/Process"><Process:primaryKeyV
alue>1</Process:primaryKeyValue><Process:businessProcessId>1</Process:busine
ssProcessId></Process:initiateProcess></soapenv:Body></soapenv:Envelope>


And my ProcessManager.wsdl has no defined SOAP BINDINGS.

Is it necessary to define soap bindings with wsdl.
Why axis2 is taking /orabpel as soapaction?

Thanks
Nancy

-----Original Message-----
From: Eran Chinthaka [mailto:chinthaka@opensource.lk] 
Sent: Wednesday, May 10, 2006 1:11 PM
To: axis-user@ws.apache.org
Subject: Re: URGENT Use axis2 to call bpel

Hi Nancy,

First, marking your messages to this list as URGENT won't help you in
any means. Rather it will make the case worse. Opensource developers are
willing and like to help others, but can not be forced to do so (except
you have a private service contract with them ;) ).


nancy wrote:
> Can anyone tell how to use axis 2 to call bpel process. Earlier I was
> using java classes generated by wsdl2java tool of axis1.But now; I don't
> want to use java classes. I want to just mention web service URL,
> message name and parameters.For eg:
> 

..............


> But using this I need to write code to get result out of OMElement. Or
> you can say I want to know how bpel process can understand the output or
> input of axis2? I am using ORACLE BPEL.
> 

Sorry I can not understand this problem. Do you wanna send a SOAPEnvelop
e and get back only the Body first child ? If you can explain a bit more
I might be able to help you.

BTW, Axis2 or any web service engine do not care whether you talk to a
BPEL server or not. It sends out and receive SOAP messages, that's all.

-- Chinthaka

>  
> 
> Thanks
> 




RE: Use axis2 to call bpel

Posted by nancy <na...@daffodildb.com>.
Hi,

I have solved my problem myself. I set action using: 		

options.setAction(messageName);	

Thanks



-----Original Message-----
From: Deepal Jayasinghe [mailto:deepal@opensource.lk] 
Sent: Wednesday, May 10, 2006 11:59 PM
To: axis-user@ws.apache.org
Subject: Re: Use axis2 to call bpel

Hi Anne;

Can you please explain to me why do you use serviceGroupConetxtID?. If
this is the first request of given invocation , then no point of sending
that in fact you will be getting a SOAP fault as well. If the service is
deployed in SOAP session scope sever will send you the corresponding
servicegroup id , then you can send that from second message invocation
on ward.

Anne Thomas Manes wrote:

> What is the SOAPAction URI specified in the WSDL for "initiateProcess"
> operation? You should specify that URI in setAction method.
>
> Anne
>
> On 5/10/06, * nancy* <nancy.aggarwal@daffodildb.com
> <ma...@daffodildb.com>> wrote:
>
>     Hi,
>     I have not used that method. My code is:
>
>     Public void invoke(){
>     Options options = new Options();
>
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>                     boolean exit = false;
>                     String serviceGroupContextId = null;
>                     EndpointReference EPR=new
>     EndpointReference(webserviceURL);
>
>                     options.setTo(EPR);
>                     options.setTimeOutInMilliSeconds (50000);
>
>                     ServiceClient serviceClient;
>                     serviceClient = new ServiceClient();
>                     serviceClient.setOptions(options);
>                     MessageContext requestMessageContext = new
>     MessageContext();
>
>     requestMessageContext.setEnvelope(getRequestEnvelope(messageName,
>     parametersList,
>                                     serviceGroupContextId));
>
>                     OperationClient opClient = serviceClient
>                                     .createClient(
>     ServiceClient.ANON_OUT_IN_OP);
>                     opClient.addMessageContext(requestMessageContext);
>                     opClient.setOptions(options);
>
>                     opClient.execute(true);
>     }
>
>     private SOAPEnvelope getRequestEnvelope(String operationName,
>                     HashMap param, String groupContextId) {
>                     String
>     namespace1="http://services.oracle.com/bpel/Process";
>
>                     SOAPFactory fac =
>     OMAbstractFactory.getSOAP11Factory();
>                     SOAPEnvelope envelope = fac.getDefaultEnvelope();
>                     OMNamespace namespace = fac.createOMNamespace(
>
>                                     namespace1, "Process");
>
>                     OMElement params1 = fac.createOMElement(operationName,
>     namespace);
>                     Set set=param.keySet();
>                     Iterator iter=set.iterator();
>
>                     while(iter.hasNext ()){
>                             String paramName=iter.next().toString();
>                             String
>     paramValue=param.get(paramName).toString();
>                              OMElement paramOM =
>     fac.createOMElement (paramName,namespace);
>                              paramOM.setText(paramValue);
>                              params1.addChild(paramOM);
>                     }
>                     envelope.getBody().setFirstChild(params1);
>
>
>                     return envelope;
>             }
>
>     Thanks
>     Nancy
>
>     -----Original Message-----
>     From: Eran Chinthaka [mailto:chinthaka@opensource.lk
>     <ma...@opensource.lk>]
>     Sent: Wednesday, May 10, 2006 2:34 PM
>     To: axis-user@ws.apache.org <ma...@ws.apache.org>
>     Subject: Re: Use axis2 to call bpel
>
>     Axis2 will never set a non-empty SOAPAction, if you have not called
>     options.setAction(youraction).
>
>     Are u sure you have not called that method.
>
>     -- Chinthaka
>
>     nancy wrote:
>     > Yah I understand that marking message with Urgent won't help in
>     getting
>     > quick reply from others.Anyways,I want to send a SOAP Envelope
>     in the way
>     > that I don't need to manipulate the requested parameter
>     (OMELEMENT) there
>     to
>     > get the parameters.
>     >
>     > I tried it but with no success. Exception is coming:
>     >
>     > Cannot find binding operation definition of soapAction
>     '/orabpel' in
>     >
>
http://daff06:9700/orabpel/default/ProcessManager/1.0/ProcessManager.wsdl
>     >
>     > My Request was:
>     >
>     >
>     > My request was:
>     >
>     > <?xml version='1.0' encoding='UTF-8'?>
>     >
>     > <soapenv:Envelope
>     > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
>     <http://schemas.xmlsoap.org/soap/envelope/>"><soapenv:Header
>     />
>     >
>     > <soapenv:Body>
>     >
>     > <Process:initiateProcess
>     >
>     xmlns:Process="http://services.oracle.com/bpel/Process
>     <http://services.oracle.com/bpel/Process>"><Process:primaryKeyV
>     >
>
alue>1</Process:primaryKeyValue><Process:businessProcessId>1</Process:busine
>     >
>
ssProcessId></Process:initiateProcess></soapenv:Body></soapenv:Envelope>
>
>     >
>     >
>     > And my ProcessManager.wsdl has no defined SOAP BINDINGS.
>     >
>     > Is it necessary to define soap bindings with wsdl.
>     > Why axis2 is taking /orabpel as soapaction?
>     >
>     > Thanks
>     > Nancy
>     >
>     > -----Original Message-----
>     > From: Eran Chinthaka [mailto:chinthaka@opensource.lk
>     <ma...@opensource.lk>]
>     > Sent: Wednesday, May 10, 2006 1:11 PM
>     > To: axis-user@ws.apache.org <ma...@ws.apache.org>
>     > Subject: Re: URGENT Use axis2 to call bpel
>     >
>     > Hi Nancy,
>     >
>     > First, marking your messages to this list as URGENT won't help
>     you in
>     > any means. Rather it will make the case worse. Opensource
>     developers are
>     > willing and like to help others, but can not be forced to do so
>     (except
>     > you have a private service contract with them ;) ).
>     >
>     >
>     > nancy wrote:
>     >> Can anyone tell how to use axis 2 to call bpel process. Earlier
>     I was
>     >> using java classes generated by wsdl2java tool of axis1.But
>     now; I don't
>     >> want to use java classes. I want to just mention web service URL,
>     >> message name and parameters.For eg:
>     >>
>     >
>     > ..............
>     >
>     >
>     >> But using this I need to write code to get result out of
>     OMElement. Or
>     >> you can say I want to know how bpel process can understand the
>     output or
>     >> input of axis2? I am using ORACLE BPEL.
>     >>
>     >
>     > Sorry I can not understand this problem. Do you wanna send a
>     SOAPEnvelop
>     > e and get back only the Body first child ? If you can explain a
>     bit more
>     > I might be able to help you.
>     >
>     > BTW, Axis2 or any web service engine do not care whether you
>     talk to a
>     > BPEL server or not. It sends out and receive SOAP messages,
>     that's all.
>     >
>     > -- Chinthaka
>     >
>     >>
>     >>
>     >> Thanks
>     >>
>     >
>     >
>     >
>     >
>
>
>
>

-- 
Thanks,
Deepal
................................................................
~Future is Open~ 



Re: Use axis2 to call bpel

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi Anne;

Can you please explain to me why do you use serviceGroupConetxtID?. If
this is the first request of given invocation , then no point of sending
that in fact you will be getting a SOAP fault as well. If the service is
deployed in SOAP session scope sever will send you the corresponding
servicegroup id , then you can send that from second message invocation
on ward.

Anne Thomas Manes wrote:

> What is the SOAPAction URI specified in the WSDL for "initiateProcess"
> operation? You should specify that URI in setAction method.
>
> Anne
>
> On 5/10/06, * nancy* <nancy.aggarwal@daffodildb.com
> <ma...@daffodildb.com>> wrote:
>
>     Hi,
>     I have not used that method. My code is:
>
>     Public void invoke(){
>     Options options = new Options();
>                     options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>                     boolean exit = false;
>                     String serviceGroupContextId = null;
>                     EndpointReference EPR=new
>     EndpointReference(webserviceURL);
>
>                     options.setTo(EPR);
>                     options.setTimeOutInMilliSeconds (50000);
>
>                     ServiceClient serviceClient;
>                     serviceClient = new ServiceClient();
>                     serviceClient.setOptions(options);
>                     MessageContext requestMessageContext = new
>     MessageContext();
>
>     requestMessageContext.setEnvelope(getRequestEnvelope(messageName,
>     parametersList,
>                                     serviceGroupContextId));
>
>                     OperationClient opClient = serviceClient
>                                     .createClient(
>     ServiceClient.ANON_OUT_IN_OP);
>                     opClient.addMessageContext(requestMessageContext);
>                     opClient.setOptions(options);
>
>                     opClient.execute(true);
>     }
>
>     private SOAPEnvelope getRequestEnvelope(String operationName,
>                     HashMap param, String groupContextId) {
>                     String
>     namespace1="http://services.oracle.com/bpel/Process";
>
>                     SOAPFactory fac =
>     OMAbstractFactory.getSOAP11Factory();
>                     SOAPEnvelope envelope = fac.getDefaultEnvelope();
>                     OMNamespace namespace = fac.createOMNamespace(
>
>                                     namespace1, "Process");
>
>                     OMElement params1 = fac.createOMElement(operationName,
>     namespace);
>                     Set set=param.keySet();
>                     Iterator iter=set.iterator();
>
>                     while(iter.hasNext ()){
>                             String paramName=iter.next().toString();
>                             String
>     paramValue=param.get(paramName).toString();
>                              OMElement paramOM =
>     fac.createOMElement (paramName,namespace);
>                              paramOM.setText(paramValue);
>                              params1.addChild(paramOM);
>                     }
>                     envelope.getBody().setFirstChild(params1);
>
>
>                     return envelope;
>             }
>
>     Thanks
>     Nancy
>
>     -----Original Message-----
>     From: Eran Chinthaka [mailto:chinthaka@opensource.lk
>     <ma...@opensource.lk>]
>     Sent: Wednesday, May 10, 2006 2:34 PM
>     To: axis-user@ws.apache.org <ma...@ws.apache.org>
>     Subject: Re: Use axis2 to call bpel
>
>     Axis2 will never set a non-empty SOAPAction, if you have not called
>     options.setAction(youraction).
>
>     Are u sure you have not called that method.
>
>     -- Chinthaka
>
>     nancy wrote:
>     > Yah I understand that marking message with Urgent won't help in
>     getting
>     > quick reply from others.Anyways,I want to send a SOAP Envelope
>     in the way
>     > that I don't need to manipulate the requested parameter
>     (OMELEMENT) there
>     to
>     > get the parameters.
>     >
>     > I tried it but with no success. Exception is coming:
>     >
>     > Cannot find binding operation definition of soapAction
>     '/orabpel' in
>     >
>     http://daff06:9700/orabpel/default/ProcessManager/1.0/ProcessManager.wsdl
>     >
>     > My Request was:
>     >
>     >
>     > My request was:
>     >
>     > <?xml version='1.0' encoding='UTF-8'?>
>     >
>     > <soapenv:Envelope
>     > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
>     <http://schemas.xmlsoap.org/soap/envelope/>"><soapenv:Header
>     />
>     >
>     > <soapenv:Body>
>     >
>     > <Process:initiateProcess
>     >
>     xmlns:Process="http://services.oracle.com/bpel/Process
>     <http://services.oracle.com/bpel/Process>"><Process:primaryKeyV
>     >
>     alue>1</Process:primaryKeyValue><Process:businessProcessId>1</Process:busine
>     >
>     ssProcessId></Process:initiateProcess></soapenv:Body></soapenv:Envelope>
>
>     >
>     >
>     > And my ProcessManager.wsdl has no defined SOAP BINDINGS.
>     >
>     > Is it necessary to define soap bindings with wsdl.
>     > Why axis2 is taking /orabpel as soapaction?
>     >
>     > Thanks
>     > Nancy
>     >
>     > -----Original Message-----
>     > From: Eran Chinthaka [mailto:chinthaka@opensource.lk
>     <ma...@opensource.lk>]
>     > Sent: Wednesday, May 10, 2006 1:11 PM
>     > To: axis-user@ws.apache.org <ma...@ws.apache.org>
>     > Subject: Re: URGENT Use axis2 to call bpel
>     >
>     > Hi Nancy,
>     >
>     > First, marking your messages to this list as URGENT won't help
>     you in
>     > any means. Rather it will make the case worse. Opensource
>     developers are
>     > willing and like to help others, but can not be forced to do so
>     (except
>     > you have a private service contract with them ;) ).
>     >
>     >
>     > nancy wrote:
>     >> Can anyone tell how to use axis 2 to call bpel process. Earlier
>     I was
>     >> using java classes generated by wsdl2java tool of axis1.But
>     now; I don't
>     >> want to use java classes. I want to just mention web service URL,
>     >> message name and parameters.For eg:
>     >>
>     >
>     > ..............
>     >
>     >
>     >> But using this I need to write code to get result out of
>     OMElement. Or
>     >> you can say I want to know how bpel process can understand the
>     output or
>     >> input of axis2? I am using ORACLE BPEL.
>     >>
>     >
>     > Sorry I can not understand this problem. Do you wanna send a
>     SOAPEnvelop
>     > e and get back only the Body first child ? If you can explain a
>     bit more
>     > I might be able to help you.
>     >
>     > BTW, Axis2 or any web service engine do not care whether you
>     talk to a
>     > BPEL server or not. It sends out and receive SOAP messages,
>     that's all.
>     >
>     > -- Chinthaka
>     >
>     >>
>     >>
>     >> Thanks
>     >>
>     >
>     >
>     >
>     >
>
>
>
>

-- 
Thanks,
Deepal
................................................................
~Future is Open~ 




Strange Codegen for RPC

Posted by mm...@tomax.com.
I have a wsdl that I have written that describes an rpc style web service. 
 When I generate the code using WSDL2Java I get some strange results.  Or 
at least it looks strange to me.  the first thing I notice is that I get 
the following classes:

Item - This represents the complex type I have defined in the WSDL.
Item0 - This seems to be a wrapper class that just has a setItem and 
getItem method
ItemManagerServiceStub - has a createItem method that takes and Item0

This seems odd to me, I would have expected to see the 
ItemManagerServiceStub class to have a method called createItem( Item 
param1 ).  Meaning that the client could create a Item object and submit 
it to the service without having to wrap it in an Item0 object first.  If 
there is a way to achieve this I would like to know how.

Another thing I noticed is that in the ItemManagerServiceStub class that I 
have submitted I see the following code:
 
    //Style is Doc.
    env = 
toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()), 
param2, optimizeContent(new javax.xml.namespace.QName("", "createItem")));
 
This seems strange because the comment says style is doc, when I have set 
the style to rpc.  This code was in the createItem method.

Basically, it just doesn't look like I am really getting a client that 
looks like a RPC client.  The generated API that uses the Item0 class and 
the //Style is Doc comment are both making me suspicious.  Just want to 
know if I am looking at a defect and/or if there is a way to get what I 
want.  Thanks

Michael MacFadden
Tomax Corp - http://www.tomax.com
mmacfadden@tomax.com

The views or opinions expressed here are not endorsed by Tomax Corp.  They 
are purely the opinions of the email author.


Re: Use axis2 to call bpel

Posted by Anne Thomas Manes <at...@gmail.com>.
What is the SOAPAction URI specified in the WSDL for "initiateProcess"
operation? You should specify that URI in setAction method.

Anne

On 5/10/06, nancy <na...@daffodildb.com> wrote:
>
> Hi,
> I have not used that method. My code is:
>
> Public void invoke(){
> Options options = new Options();
>                 options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>                 boolean exit = false;
>                 String serviceGroupContextId = null;
>                 EndpointReference EPR=new
> EndpointReference(webserviceURL);
>
>                 options.setTo(EPR);
>                 options.setTimeOutInMilliSeconds(50000);
>
>                 ServiceClient serviceClient;
>                 serviceClient = new ServiceClient();
>                 serviceClient.setOptions(options);
>                 MessageContext requestMessageContext = new
> MessageContext();
>
> requestMessageContext.setEnvelope(getRequestEnvelope(messageName,
> parametersList,
>                                 serviceGroupContextId));
>
>                 OperationClient opClient = serviceClient
>                                 .createClient(ServiceClient.ANON_OUT_IN_OP
> );
>                 opClient.addMessageContext(requestMessageContext);
>                 opClient.setOptions(options);
>
>                 opClient.execute(true);
> }
>
> private SOAPEnvelope getRequestEnvelope(String operationName,
>                 HashMap param, String groupContextId) {
>                 String namespace1="http://services.oracle.com/bpel/Process
> ";
>
>                 SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
>                 SOAPEnvelope envelope = fac.getDefaultEnvelope();
>                 OMNamespace namespace = fac.createOMNamespace(
>
>                                 namespace1, "Process");
>
>                 OMElement params1 = fac.createOMElement(operationName,
> namespace);
>                 Set set=param.keySet();
>                 Iterator iter=set.iterator();
>
>                 while(iter.hasNext()){
>                         String paramName=iter.next().toString();
>                         String paramValue=param.get(paramName).toString();
>                          OMElement paramOM =
> fac.createOMElement(paramName,namespace);
>                          paramOM.setText(paramValue);
>                          params1.addChild(paramOM);
>                 }
>                 envelope.getBody().setFirstChild(params1);
>
>
>                 return envelope;
>         }
>
> Thanks
> Nancy
>
> -----Original Message-----
> From: Eran Chinthaka [mailto:chinthaka@opensource.lk]
> Sent: Wednesday, May 10, 2006 2:34 PM
> To: axis-user@ws.apache.org
> Subject: Re: Use axis2 to call bpel
>
> Axis2 will never set a non-empty SOAPAction, if you have not called
> options.setAction(youraction).
>
> Are u sure you have not called that method.
>
> -- Chinthaka
>
> nancy wrote:
> > Yah I understand that marking message with Urgent won't help in getting
> > quick reply from others.Anyways,I want to send a SOAP Envelope in the
> way
> > that I don't need to manipulate the requested parameter (OMELEMENT)
> there
> to
> > get the parameters.
> >
> > I tried it but with no success. Exception is coming:
> >
> > Cannot find binding operation definition of soapAction '/orabpel' in
> >
> http://daff06:9700/orabpel/default/ProcessManager/1.0/ProcessManager.wsdl
> >
> > My Request was:
> >
> >
> > My request was:
> >
> > <?xml version='1.0' encoding='UTF-8'?>
> >
> > <soapenv:Envelope
> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> "><soapenv:Header
> />
> >
> > <soapenv:Body>
> >
> > <Process:initiateProcess
> >
> xmlns:Process="http://services.oracle.com/bpel/Process
> "><Process:primaryKeyV
> >
>
> alue>1</Process:primaryKeyValue><Process:businessProcessId>1</Process:busine
> > ssProcessId></Process:initiateProcess></soapenv:Body></soapenv:Envelope>
> >
> >
> > And my ProcessManager.wsdl has no defined SOAP BINDINGS.
> >
> > Is it necessary to define soap bindings with wsdl.
> > Why axis2 is taking /orabpel as soapaction?
> >
> > Thanks
> > Nancy
> >
> > -----Original Message-----
> > From: Eran Chinthaka [mailto:chinthaka@opensource.lk]
> > Sent: Wednesday, May 10, 2006 1:11 PM
> > To: axis-user@ws.apache.org
> > Subject: Re: URGENT Use axis2 to call bpel
> >
> > Hi Nancy,
> >
> > First, marking your messages to this list as URGENT won't help you in
> > any means. Rather it will make the case worse. Opensource developers are
> > willing and like to help others, but can not be forced to do so (except
> > you have a private service contract with them ;) ).
> >
> >
> > nancy wrote:
> >> Can anyone tell how to use axis 2 to call bpel process. Earlier I was
> >> using java classes generated by wsdl2java tool of axis1.But now; I
> don't
> >> want to use java classes. I want to just mention web service URL,
> >> message name and parameters.For eg:
> >>
> >
> > ..............
> >
> >
> >> But using this I need to write code to get result out of OMElement. Or
> >> you can say I want to know how bpel process can understand the output
> or
> >> input of axis2? I am using ORACLE BPEL.
> >>
> >
> > Sorry I can not understand this problem. Do you wanna send a SOAPEnvelop
> > e and get back only the Body first child ? If you can explain a bit more
> > I might be able to help you.
> >
> > BTW, Axis2 or any web service engine do not care whether you talk to a
> > BPEL server or not. It sends out and receive SOAP messages, that's all.
> >
> > -- Chinthaka
> >
> >>
> >>
> >> Thanks
> >>
> >
> >
> >
> >
>
>
>
>

RE: Use axis2 to call bpel

Posted by nancy <na...@daffodildb.com>.
Hi,
I have not used that method. My code is:

Public void invoke(){
Options options = new Options();
		options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
		boolean exit = false;
		String serviceGroupContextId = null;
		EndpointReference EPR=new EndpointReference(webserviceURL);
		
		options.setTo(EPR);
		options.setTimeOutInMilliSeconds(50000);
		
		ServiceClient serviceClient;	
		serviceClient = new ServiceClient();		
		serviceClient.setOptions(options);	
		MessageContext requestMessageContext = new MessageContext();
	
requestMessageContext.setEnvelope(getRequestEnvelope(messageName,
parametersList,
				serviceGroupContextId));

		OperationClient opClient = serviceClient
				.createClient(ServiceClient.ANON_OUT_IN_OP);
		opClient.addMessageContext(requestMessageContext);
		opClient.setOptions(options);
		
		opClient.execute(true);
}

private SOAPEnvelope getRequestEnvelope(String operationName,
		HashMap param, String groupContextId) {
		String namespace1="http://services.oracle.com/bpel/Process";

		SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
		SOAPEnvelope envelope = fac.getDefaultEnvelope();
		OMNamespace namespace = fac.createOMNamespace(

				namespace1, "Process");

		OMElement params1 = fac.createOMElement(operationName,
namespace);	
		Set set=param.keySet();
		Iterator iter=set.iterator();
	
		while(iter.hasNext()){
			String paramName=iter.next().toString();
			String paramValue=param.get(paramName).toString();
			 OMElement paramOM =
fac.createOMElement(paramName,namespace);
			 paramOM.setText(paramValue);
			 params1.addChild(paramOM);
		}
		envelope.getBody().setFirstChild(params1);	    
		
		
		return envelope;
	} 

Thanks
Nancy

-----Original Message-----
From: Eran Chinthaka [mailto:chinthaka@opensource.lk] 
Sent: Wednesday, May 10, 2006 2:34 PM
To: axis-user@ws.apache.org
Subject: Re: Use axis2 to call bpel

Axis2 will never set a non-empty SOAPAction, if you have not called
options.setAction(youraction).

Are u sure you have not called that method.

-- Chinthaka

nancy wrote:
> Yah I understand that marking message with Urgent won't help in getting
> quick reply from others.Anyways,I want to send a SOAP Envelope in the way
> that I don't need to manipulate the requested parameter (OMELEMENT) there
to
> get the parameters.
> 
> I tried it but with no success. Exception is coming:
> 
> Cannot find binding operation definition of soapAction '/orabpel' in
> http://daff06:9700/orabpel/default/ProcessManager/1.0/ProcessManager.wsdl
> 
> My Request was:
> 
> 
> My request was: 
> 
> <?xml version='1.0' encoding='UTF-8'?>
> 
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header
/>
> 
> <soapenv:Body>
> 
> <Process:initiateProcess
>
xmlns:Process="http://services.oracle.com/bpel/Process"><Process:primaryKeyV
>
alue>1</Process:primaryKeyValue><Process:businessProcessId>1</Process:busine
> ssProcessId></Process:initiateProcess></soapenv:Body></soapenv:Envelope>
> 
> 
> And my ProcessManager.wsdl has no defined SOAP BINDINGS.
> 
> Is it necessary to define soap bindings with wsdl.
> Why axis2 is taking /orabpel as soapaction?
> 
> Thanks
> Nancy
> 
> -----Original Message-----
> From: Eran Chinthaka [mailto:chinthaka@opensource.lk] 
> Sent: Wednesday, May 10, 2006 1:11 PM
> To: axis-user@ws.apache.org
> Subject: Re: URGENT Use axis2 to call bpel
> 
> Hi Nancy,
> 
> First, marking your messages to this list as URGENT won't help you in
> any means. Rather it will make the case worse. Opensource developers are
> willing and like to help others, but can not be forced to do so (except
> you have a private service contract with them ;) ).
> 
> 
> nancy wrote:
>> Can anyone tell how to use axis 2 to call bpel process. Earlier I was
>> using java classes generated by wsdl2java tool of axis1.But now; I don't
>> want to use java classes. I want to just mention web service URL,
>> message name and parameters.For eg:
>>
> 
> ..............
> 
> 
>> But using this I need to write code to get result out of OMElement. Or
>> you can say I want to know how bpel process can understand the output or
>> input of axis2? I am using ORACLE BPEL.
>>
> 
> Sorry I can not understand this problem. Do you wanna send a SOAPEnvelop
> e and get back only the Body first child ? If you can explain a bit more
> I might be able to help you.
> 
> BTW, Axis2 or any web service engine do not care whether you talk to a
> BPEL server or not. It sends out and receive SOAP messages, that's all.
> 
> -- Chinthaka
> 
>>  
>>
>> Thanks
>>
> 
> 
> 
> 




Re: Use axis2 to call bpel

Posted by An...@mro.com.
with the limited experience that I have with oracle bpel engine - if you do
not provide a soapaction the oracle bpel engine which is hosting your
process web service will default the soapaction to "orabpel" and will try
to find that binding - which obviously does not exist. You have to look at
ur oracle generated process wsdl and see what the soapction for ur web
service call is and then explicitly set that soapaction from your client.

HTH
Anamitra


                                                                           
             Eran Chinthaka                                                
             <chinthaka@openso                                             
             urce.lk>                                                   To 
                                       axis-user@ws.apache.org             
             05/10/2006 05:03                                           cc 
             AM                                                            
                                                                   Subject 
                                       Re: Use axis2 to call bpel          
             Please respond to                                             
             axis-user@ws.apac                                             
                  he.org                                                   
                                                                           
                                                                           
                                                                           




Axis2 will never set a non-empty SOAPAction, if you have not called
options.setAction(youraction).

Are u sure you have not called that method.

-- Chinthaka

nancy wrote:
> Yah I understand that marking message with Urgent won't help in getting
> quick reply from others.Anyways,I want to send a SOAP Envelope in the way
> that I don't need to manipulate the requested parameter (OMELEMENT) there
to
> get the parameters.
>
> I tried it but with no success. Exception is coming:
>
> Cannot find binding operation definition of soapAction '/orabpel' in
> http://daff06:9700/orabpel/default/ProcessManager/1.0/ProcessManager.wsdl
>
> My Request was:
>
>
> My request was:
>
> <?xml version='1.0' encoding='UTF-8'?>
>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header
/>
>
> <soapenv:Body>
>
> <Process:initiateProcess
> xmlns:Process="http://services.oracle.com/bpel/Process
"><Process:primaryKeyV
>
alue>1</Process:primaryKeyValue><Process:businessProcessId>1</Process:busine

> ssProcessId></Process:initiateProcess></soapenv:Body></soapenv:Envelope>
>
>
> And my ProcessManager.wsdl has no defined SOAP BINDINGS.
>
> Is it necessary to define soap bindings with wsdl.
> Why axis2 is taking /orabpel as soapaction?
>
> Thanks
> Nancy
>
> -----Original Message-----
> From: Eran Chinthaka [mailto:chinthaka@opensource.lk]
> Sent: Wednesday, May 10, 2006 1:11 PM
> To: axis-user@ws.apache.org
> Subject: Re: URGENT Use axis2 to call bpel
>
> Hi Nancy,
>
> First, marking your messages to this list as URGENT won't help you in
> any means. Rather it will make the case worse. Opensource developers are
> willing and like to help others, but can not be forced to do so (except
> you have a private service contract with them ;) ).
>
>
> nancy wrote:
>> Can anyone tell how to use axis 2 to call bpel process. Earlier I was
>> using java classes generated by wsdl2java tool of axis1.But now; I don't
>> want to use java classes. I want to just mention web service URL,
>> message name and parameters.For eg:
>>
>
> ..............
>
>
>> But using this I need to write code to get result out of OMElement. Or
>> you can say I want to know how bpel process can understand the output or
>> input of axis2? I am using ORACLE BPEL.
>>
>
> Sorry I can not understand this problem. Do you wanna send a SOAPEnvelop
> e and get back only the Body first child ? If you can explain a bit more
> I might be able to help you.
>
> BTW, Axis2 or any web service engine do not care whether you talk to a
> BPEL server or not. It sends out and receive SOAP messages, that's all.
>
> -- Chinthaka
>
>>
>>
>> Thanks
>>
>
>
>
>


(See attached file: signature.asc)

Re: Use axis2 to call bpel

Posted by Eran Chinthaka <ch...@opensource.lk>.
Axis2 will never set a non-empty SOAPAction, if you have not called
options.setAction(youraction).

Are u sure you have not called that method.

-- Chinthaka

nancy wrote:
> Yah I understand that marking message with Urgent won't help in getting
> quick reply from others.Anyways,I want to send a SOAP Envelope in the way
> that I don't need to manipulate the requested parameter (OMELEMENT) there to
> get the parameters.
> 
> I tried it but with no success. Exception is coming:
> 
> Cannot find binding operation definition of soapAction '/orabpel' in
> http://daff06:9700/orabpel/default/ProcessManager/1.0/ProcessManager.wsdl
> 
> My Request was:
> 
> 
> My request was: 
> 
> <?xml version='1.0' encoding='UTF-8'?>
> 
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header />
> 
> <soapenv:Body>
> 
> <Process:initiateProcess
> xmlns:Process="http://services.oracle.com/bpel/Process"><Process:primaryKeyV
> alue>1</Process:primaryKeyValue><Process:businessProcessId>1</Process:busine
> ssProcessId></Process:initiateProcess></soapenv:Body></soapenv:Envelope>
> 
> 
> And my ProcessManager.wsdl has no defined SOAP BINDINGS.
> 
> Is it necessary to define soap bindings with wsdl.
> Why axis2 is taking /orabpel as soapaction?
> 
> Thanks
> Nancy
> 
> -----Original Message-----
> From: Eran Chinthaka [mailto:chinthaka@opensource.lk] 
> Sent: Wednesday, May 10, 2006 1:11 PM
> To: axis-user@ws.apache.org
> Subject: Re: URGENT Use axis2 to call bpel
> 
> Hi Nancy,
> 
> First, marking your messages to this list as URGENT won't help you in
> any means. Rather it will make the case worse. Opensource developers are
> willing and like to help others, but can not be forced to do so (except
> you have a private service contract with them ;) ).
> 
> 
> nancy wrote:
>> Can anyone tell how to use axis 2 to call bpel process. Earlier I was
>> using java classes generated by wsdl2java tool of axis1.But now; I don't
>> want to use java classes. I want to just mention web service URL,
>> message name and parameters.For eg:
>>
> 
> ..............
> 
> 
>> But using this I need to write code to get result out of OMElement. Or
>> you can say I want to know how bpel process can understand the output or
>> input of axis2? I am using ORACLE BPEL.
>>
> 
> Sorry I can not understand this problem. Do you wanna send a SOAPEnvelop
> e and get back only the Body first child ? If you can explain a bit more
> I might be able to help you.
> 
> BTW, Axis2 or any web service engine do not care whether you talk to a
> BPEL server or not. It sends out and receive SOAP messages, that's all.
> 
> -- Chinthaka
> 
>>  
>>
>> Thanks
>>
> 
> 
> 
>