First we add the Direct Binding Service to exposed Services side of the composite and use the WSDL of one of the other exposed services and add a Wire to the Component.
In the source view of the composite xml you can see that this service uses the direct binding.
<service name="RMIService" ui:wsdlLocation="BPELProcess1.wsdl"> <interface.wsdl interface="http://xmlns.oracle.com/HelloWorld/Helloworld/BPELProcess1#wsdl.interface(BPELProcess1)"/> <binding.direct/> </service>
To see the WSDL of this service go to http://localhost:8001/soa-infra/ and select your RMI service.
The source of project is on github check https://github.com/biemond/soa11g_examples/tree/master/SOA_Directbinding where I use adf binding , directbinding and starting these from java and also start / stop composite , check activated instances , start unit tests.
Hi Edwin,
ReplyDeleteWhat are the jar file I need to include for this?
Thanks
Anju
Hi,
ReplyDeletehere they are
xmlparserv2
weblogic remote client
MiddlewareJdev11gR1PS1\jdeveloper\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar
MiddlewareJdev11gR1PS1\oracle_common\modules\oracle.fabriccommon_11.1.1\fabric-common.jar
MiddlewareJdev11gR1PS1\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-client.jar
MiddlewareJdev11gR1PS1\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-ext.jar
MiddlewareJdev11gR1PS1\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime.jar
MiddlewareJdev11gR1PS1\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\oracle-soa-client-api.jar
MiddlewareJdev11gR1PS1\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\oracle.soa.fabric.jar
Thanks Edwin!
ReplyDeleteAnju
Hi Edwin,
ReplyDeleteThis was quite useful. Just one issue I came across
When I implemented this I was getting the below exception.
For some reason the namespace was not getting parsed.
oracle.soa.api.invocation.InvocationException: oracle.xml.parser.v2.XMLDOMException: invalid namespace null for prefix client
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
at oracle.integration.platform.blocks.direct.SOADirectInvokerBean_3erlhk_InvokerImpl_1032_WLStub.post(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
So I had to include the following before the parse()
//System.out.println(builder.isNamespaceAware());
docBuilderFactory.setNamespaceAware(true);
Thanks again,
Anju
Hi Edwin,
ReplyDeleteAre you deploying the composite with binding.direct tag using ANT?
We are getting the following error while trying to deploy using ANT. It deploys fine from JDEV .
Line 62, Column 22>: XML-24534: (Error) Element 'binding.direct' not expected.
[scac] [FATAL_ERROR] Location [/ns:composite/ns:service[@name='ABCDirectBinding']] Line [59] Column [66] No binding information available for service "ABCDirectBinding", please provide this in the composite
Any idea?
Thanks
Anju
Strange,
ReplyDeleteI do both. I will take a look. are you using 11g R1 PS1 for Soa Suite
thanks
Yes , we are using PS1.
ReplyDeleteBy default the service tag looked like below
But when we changed it to
it got deployed from ANT (this composite was not supported in the design view of JDEV though)
But we couldnot findout why this the default tag is not recognised in ANT
thanks
Anju
Hi,
ReplyDeleteyou can not post xml in a comment , first need to convert it. so I can't see you xml code
in ant you can build and compile it and probably this compiler action is more strict then jdev or the soa suite.
Hi Edwin,
ReplyDeletewhat is the difference between ADF binding and Direct binding? i read through your other article on ADF binding and i don't see any difference between those two bindings except VS ..can you please explain it?
Thanks/Steve
Hi,
ReplyDeleteThere are differences, but it look the same.
With Directbinding you use.
DirectConnection conn = locator.createDirectConnection(compositedn,"RMIService");
Message response = conn.request("process", request);
with ADF Binding
Service service = composite.getService("bpelprocess1_client_ep2");
res = service.request("process", input);
I think Oracle optimized this for OSB and ADF. Direct Binding is coming of OSB and I think Oracle is going to do something with the ADF Binding. Maybe direct binding is not handy for the ADF bindings.
Maybe you can decompile the see the differences.
thanks
Hi, Edwin:
ReplyDeleteThese are very helpful. For ADF and direct binding, both need to modify the composite xml to add a new service in exposed service lane. Just curious, is there anyway that java can invoke the process from the original "binding.ws" without any modification of composite.xml? I am thinking to use jaxws dynamic client to invoke the process, but not sure if it works.
Thanks,
Bin
Hi Bin,
ReplyDeletethis is possible , you can generate a web service proxy but its add some extra overhead .
adf and direct binding is faster
good luck
Hi, Edwin:
ReplyDeleteUnder "DirectConnection" interface, there are two methods request(Invoke a request/response operation) and post(Post a one way message) available. Just wonder from where that we can tell, for a deployed soa composite (including bpel) application, which method should be used? Or how do we know if the service is synchronous or asynchronous?
Many thanks,
Bin
From the API level, we can use Component getDefinition() method to get a xml of bpel implementation detail to decide if the bpel is synchrous or not. So far this is the only way I have found. Please correct me if I am wrong. Thanks!
ReplyDeleteHi,
ReplyDeleteWhen I read this http://download.oracle.com/docs/cd/E16764_01/integration.1111/e10224/invocapi.htm , I think it is possible
46.1.2 Asynchronous Direct Binding Invocation
Asynchronous invocation relies on the WS-Addressing headers set on the message instance. All headers must adhere to WS-Addressing specification.
The direct binding invocation API allows the clients to specify the WS-Addressing ReplyTo SOAP header to communicate a destination by which they can receive responses.
you can use the normal request(Invoke a request/response operation) . This code does all the work for you. Don't need to change anything
Thanks
Hi, Edwin:
ReplyDeleteThanks for your reply. If I understand right, request method in DirectConnection class can handle both sync and async calls, post method handle one way call only, right? Just curious in an async call, how the returned object can be retrieved if request method is not blocking?
The other question is in ADF binding, it seems only the request/post methods from Service class can be used, but they deprecated in the API, and is pointed to DirectConnection request/post methods, do you know why? Does this mean direct bind is preferred over ADF binding?
void post(java.lang.String operationName, oracle.fabric.common.NormalizedMessage message)
Deprecated. use oracle.soa.api.DirectConnection#post
oracle.fabric.common.NormalizedMessage request(java.lang.String operationName, oracle.fabric.common.NormalizedMessage message)
Deprecated. use oracle.soa.api.DirectConnection#request
Thank you very much for your help!
Bin
Hi,
ReplyDeleteI think async calls with the request will block your method( no difference with sync ). else you need some callback thread.
yep I think adf binding was first but direct binding is preferred because of the OSB integration. They look the same and I think there is no performance advantage between these two. And there is no Gui support for the adf binding.
thanks
Hi Edwin,
ReplyDeleteCan you please let me know, what is the difference between SOA-Direct and Sb protocols and when to use which one?
Thanks & Regards
Kaustav Das
Hi,
ReplyDeleteboth use t3 rmi but sb is an internal OSB transport and direct binding can be used in the soa suite / osb communication.
thanks
Hi Edwin,
ReplyDeleteI have a running hellow World Example in 11g and was using the code sameple code with the direct binding ...i am getting the following error
oracle.soa.api.invocation.InvocationException: Correlation definition not registered.
The correlation set definition for operation process, process Raja/Project2!1.0*soa_b86367e7-ca6c-4570-b10e-3ed26a508ac6/MyTestProcess2, is not registered with the server.
The correlation set was not defined in the process.
Redeploy the process to the container.
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
However, once I remove the Patner Links that comes with the hello world example and just keep the Direct Binding ...it works.
The question is can i not keep both the patner links in Bpel and use it at will.
Also,when a bPEl process is created with a web service...How is it expected to used from any APP...do we always have to create Adapter...can we not invove the web service directly
Hi,
ReplyDeleteStrange, looks like a bug. I got a helloworld bpel with 3 services, this works. What you say when you got a reference in the BPEL and it does not work.
thanks
I hit the same issue..
ReplyDeleteI deleted the other client, and now only have the direct binding, still the problem persists.
some googling later I found http://puchaanirudh.blogspot.com/2007_06_01_archive.html. Here it says as a solution :
Install the patch : 5332819
ORABPEL-03802 CORRELATION DEFINITION NOT REGISTERED.
I am using 11.1.1.3 and definitely the post above is from the 10g era...can these issues be still related !
ok..i hadnt removed the ws binding from the bpel diagram, only from the composite.xml. Now I removed it from bpel diagram too and reconnected the receive and reply activities to the direct client, and yes, it does work. But ofcourse, this is very limiting. Still thinking ....
ReplyDeleteok..i have got it to work with both bindings now. Here is what I did. Apart from adding the direct binding as explained in this blog, we also need to connect that new client to the bpel process explicitly. If not already there, add
ReplyDeletein the .bpel file's partnerlink section.
Then delete the receive activity and use pick (!!yes i know its convoluted, maybe there is a better way).
Then, create an extra reply activity and connect it to the direct binding client and return the same output variable.
Hi Amit,
ReplyDeleteWell done.
thanks
Hi Edwin,
ReplyDeleteThank you for publishing this - it got me off the ground a lot faster than using the official documentation alone.
I was wondering: I see that Locator has a close() method. Is it advisable to call this at the end to clean up? If so, should conn.close() be called as well, or do you know if locator.close() would take care of this?
Hi,
ReplyDeletethat is good practice. just do both , first close the connection and then the locator.
Maybe use a decompiler , so you know for sure.
thanks
This comment has been removed by the author.
ReplyDeleteWhen calling from composite to composite on the same server, does the server optimize the HTTP/Webservice call to the second composite to a directbinding call? OR
ReplyDeleteis there a need to have a direct binding to the second composite when both the first and second composite are co-located on the same server to get a better performance?
Hi,
ReplyDeleteit can detect if is on the same server so it will then always use the internal transport. So you can just add a http service and use a http reference.
thanks
From out testing it looks like it uses the local reference (which I think is the WSIF java binding) for optimization. For direct binding it has to specified explicitly (which uses weblogics' T3 protocol -which looks like a replacement for Oracle ORMI)
ReplyDeleteHi Edwin,
ReplyDeleteI got this error when a use my client.
Uninitialized data element.
DataOutput initiatorMessage is not initialized in flow element oracle.bpm.bpmn.engine.model.metadataextension.CatchEventAdapter@1dd669a.
Make sure to initialize DataOutput initiatorMessage before using it in flow element oracle.bpm.bpmn.engine.model.metadataextension.CatchEventAdapter@1dd669a.
I expose a Web Service like direct binding with one method with 2 parameters and return void.
Thanks in advance
Hi,
ReplyDeletewhen I look at this
DataOutput initiatorMessage is not initialized
I think it got some problem with the void. It can't handle your one way operation.
are you using it with bpm.
thanks
Yes, I am using it with bpm.
ReplyDeleteI need to run a BPM from a java class.
Thanks in advance.
Mariano
Hi Edwin,
ReplyDeleteI use your exmple, but I modified the xsd to accept an Array of Strings.
but I get this error when I sent more than one String in the list.
bpmn:getDataOutput('process')/ns:parts return multiple nodes.
Any Idea?
Thanks in advance
Hi,
ReplyDeleteCan you change your composite so it returns something.
And Pino got some great examples with calling bpm processes. Maybe he can help you
http://soadev.blogspot.com/2011/07/getting-bpm-initiabletasks-and.html
thanks
Hi Edwin,
ReplyDeleteWhen i test you hello world, i get the below error:
weblogic.rjvm.PeerGoneException: ; nested exception is:
java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is:
java.io.InvalidClassException: oracle.soa.management.internal.facade.BaseFacade; local class incompatible: stream classdesc serialVersionUID = 2, local class serialVersionUID = 1
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
at oracle.soa.management.internal.ejb.impl.FacadeFinderBean_4vacyo_FacadeFinderBeanImpl_1033_WLStub.lookupComposite(Unknown Source)
at oracle.soa.management.internal.ejb.EJBLocatorImpl.lookupComposite(EJBLocatorImpl.java:212)
at nl.whitehorses.soa.client.StartProcess.(StartProcess.java:58)
at nl.whitehorses.soa.client.StartProcess.main(StartProcess.java:156)
Caused by: java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is:
java.io.InvalidClassException: oracle.soa.management.internal.facade.BaseFacade; local class incompatible: stream classdesc serialVersionUID = 2, local class serialVersionUID = 1
at weblogic.rjvm.MsgAbbrevJVMConnection.dispatch(MsgAbbrevJVMConnection.java:448)
at weblogic.rjvm.t3.MuxableSocketT3.dispatch(MuxableSocketT3.java:322)
at weblogic.socket.BaseAbstractMuxableSocket.dispatch(BaseAbstractMuxableSocket.java:298)
at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:915)
at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:844)
at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:335)
at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
Caused by: java.io.InvalidClassException: oracle.soa.management.internal.facade.BaseFacade; local class incompatible: stream classdesc serialVersionUID = 2, local class serialVersionUID = 1
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1316)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at weblogic.rjvm.ClassTableEntry.readExternal(ClassTableEntry.java:36)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at weblogic.rjvm.InboundMsgAbbrev.readObject(InboundMsgAbbrev.java:65)
at weblogic.rjvm.InboundMsgAbbrev.read(InboundMsgAbbrev.java:37)
at weblogic.rjvm.MsgAbbrevJVMConnection.readMsgAbbrevs(MsgAbbrevJVMConnection.java:227)
at weblogic.rjvm.MsgAbbrevInputStream.init(MsgAbbrevInputStream.java:173)
at weblogic.rjvm.MsgAbbrevJVMConnection.dispatch(MsgAbbrevJVMConnection.java:439)
... 9 more
Hi,
ReplyDeleteYour local SOA libs does not match with the SOA server library. Use the same patch level on client and server.
Thanks
Hi Edwin,
ReplyDeleteWe are calling our BPEL process under weblogic server 11g SOA from standalone Java client .
we were using the SOA management Java reference 11.1.1.5.0 APIs in our code as shown below:
we are using the jars:
ejb30.jar,
ejb.jar
fabric-common.jar,
optic.jar,
oracle-soa-client-api.jar,
soa-infra-mgmt.jar,
wlfullclient.jar,
wsclient_extended.jar,
xmlparserv2.jar..
CompositeDN compositeDN = new CompositeDN("default","MasterBPELProcess", "1.0");
DirectConnection dic = locator.createDirectConnection(compositeDN, "MasterBPELProcess");
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = docBuilderFactory.newDocumentBuilder();
Document doc = builder.parse(new InputSource(new StringReader(inputPayload)));
Element root = doc.getDocumentElement();
Map mpayload = new HashMap();
mpayload.put("payload", root);
Payload payload = PayloadFactory.createXMLPayload(mpayload);
Message request = XMLMessageFactory.getInstance().createMessage();
request.setPayload(payload);
try {
Message response =
dic.request(operationName, request);}catch(InvocationException e){}
we are getting the Below Exception, while sending the request :
try {
Message response =
**dic.request(operationName, request);}catch(InvocationException e){}
oracle.soa.api.invocation.InvocationException: ; nested exception is:
java.io.EOFException; nested exception is: java.io.EOFException
at oracle.soa.api.DirectConnectionImpl.request(DirectConnectionImpl.java:126)
at oracle.soa.api.CachedConnectionProxy.request(CachedConnectionProxy.java:57)
at com.verizon.vsii.initiate.InitializeBPELProcess.initBPEL(InitializeBPELProcess.java:266)
at com.verizon.vsii.initiate.InitializeBPELProcessBatch.initBPEL(InitializeBPELProcessBatch.java:66)
at com.verizon.vsii.initiate.InitializeBPELProcessBatch.main(InitializeBPELProcessBatch.java:75)
Caused by: javax.ejb.EJBException: ; nested exception is:
java.io.EOFException; nested exception is: java.io.EOFException
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:121)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:96)
at $Proxy4.request(Unknown Source)
at oracle.soa.api.DirectConnectionImpl.request(DirectConnectionImpl.java:114)
... 4 more
Caused by: java.io.EOFException
at weblogic.rjvm.t3.MuxableSocketT3.endOfStream(MuxableSocketT3.java:345)
at weblogic.socket.SocketMuxer.deliverExceptionAndCleanup(SocketMuxer.java:826)
at weblogic.socket.SocketMuxer.deliverEndOfStream(SocketMuxer.java:760)
BPEL Response:
Error in executing BPEL process Syncronously
args.length 0
at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:941)
at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:888)
at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:339)
at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
Note:
I have given the code.Pls let's know what is the reason for this exception( asap ), also let us know is there any solution to solve this problem & reference for using that API.
Hi,
ReplyDeleteI need to have the server side . What is the wsdl and you used bpel and what is your service binding.
Make a simple test case
In the about you can see my email address
Thanks
Hi Edwin,
ReplyDeletewe are also using a callback which will identify the service with its conversationId, and wait for the service's result and return to the Frontend.
To do this we are implementing the callBack Interface, need to know about the usage of the Interface.
Hi Edwin, i tried to execute your code but i have a "java.lang.ExceptionInInitializerError" exception on "conn.request" line.
ReplyDeleteThere is a completed process instance on SOA AdminServer (with a correct reponse), but i can't handle BPEL response from Java.
What can i do?
Thanks,
Andy
Hi,
ReplyDeleteStrange , can you tell me about your environment , what is your patch level , PS3 or 4. Do you have one admin server with everything in it. check if you have the matching jdeveloper
can you retrieve the instances from the java api.
thanks.
Hi Boss,
ReplyDeletedo you get an error, I think the client waits for the async callback
and I think there is no different code on the client side.
thanks
Thanks for your reply,
ReplyDeletei have an admin server (PS4) with everything on it.
I downloaded your direct-binding example from github and it works, so i tried to reuse "StartRMIProcess" (i changed names of composite, application, direct binding, part, connection data and inputPayload with mine) to call another project (in this project there is only a direct-binding and a BPEL process that assign input to output variable) but, as i said before, it doesn't work.
There aren't problem with conn.post, while trying to use conn.request deal to an "ExceptionInInitializerError" .
Hi, i solved my problem adding these two libraries: "JAX-RPC Client" and "BC4J Security".
ReplyDeleteI need these libraries to receive a response from BPEL mediator.
Hi Edwin,
ReplyDeleteThank you very much for the detailed scenario and comment answers.
On a pure SOA Suite environmemt does it make sense to use direct binding for all the service connections instead of pure http (as long as you don't want to expose them to the outside world)?
Hi,
ReplyDeletefrom composite to composite you dont need to do anything, soa will detect this and use the internal way.
But from osb to soa or back then it can be handy to use the direct binding. It is fast and supports transactions.
From java you can use it but a payload mistake is easily made , better use a ws proxy which uses jaxb.
thanks
Edwin,
ReplyDeleteI have been able to successfully download and implement your direct binding BPEL process invocation examples. However, when I try to use the Locator API with an exposed direct binding service to invoke a BPMN process, the process throws a non-recoverable system fault within the BPMN process. The fault trace looks something like this:
Error Message: {http://schemas.oracle.com/bpel/extension}runtimeFault
Fault ID default/Project1!1.0*soa_bad505c9-5d4a-4f2b-b84c-67b48c9721de/NewBPMNProcess/90013-startEvent0-NewBPMNProcess.1-2
Fault Time Mar 27, 2012 4:16:32 PM
Non Recoverable System Fault :
<bpelFault><faultType>0</faultType><runtimeFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>null</summary></part><part name="detail"><detail>java.lang.NullPointerException at oracle.bpm.bpmn.engine.model.runtime.util.ServiceInteractionUtils.unwrapArguments(ServiceInteractionUtils.java:87) at oracle.bpm.bpmn.engine.model.runtime.microinstructions.MIProcessMessageOutputDataAssociationsForService$Step2.doExecute(MIProcessMessageOutputDataAssociationsForService.java:128)
...
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473) at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) </detail></part><part name="code"><code>java.lang.NullPointerException</code></part></runtimeFault></bpelFault>Do you have any suggestions for using the Locator API to invoke BPMN processes using the Direct Binding and ADF services? Please let me know if you have any questions or would like to see any other error information.
Thanks for your help!
Hi,
DeleteCan you make a simple testcase and send it to biemond at gmail dot com.
then I will take a look and test it.
thanks
try this:
Delete...
partData.put("parameters", root);
...
instead of:
...
partData.put("payload", root);
...
Greetings
Exception in thread "Main Thread" java.lang.NoClassDefFoundError: oracle/jrf/PortabilityLayerException
ReplyDeleteat oracle.soa.management.internal.ejb.EJBLocatorImpl.lookupBean(EJBLocatorImpl.java:748)
at oracle.soa.management.internal.ejb.EJBLocatorImpl.lookupFinderBean(EJBLocatorImpl.java:735)
at oracle.soa.management.internal.ejb.EJBLocatorImpl.(EJBLocatorImpl.java:166)
locator = LocatorFactory.createLocator(jndiProps);
failing at the above code...below is the exception while running standalone start process();
==========================================================
at oracle.soa.management.facade.LocatorFactory.createLocator(LocatorFactory.java:35)
at callingcompositefromjava.CallingComposite.(CallingComposite.java:54)
at callingcompositefromjava.CallingComposite.main(CallingComposite.java:157)
Process exited.
Here is an example at github
Deletehttps://github.com/biemond/soa11g_examples/tree/master/SOA_Directbinding
this works and always include the version number of the composite.
Composite composite = locator.lookupComposite("default/Helloworld!1.0");
or
CompositeDN compositedn = new CompositeDN("default", "Helloworld", "1.0");
good luck
Hi Edwin,
ReplyDeleteI tried your composite and java but i am getting exception.
oracle.soa.api.invocation.InvocationException: invalid namespace null for prefix client
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
Yourself and Amit were discussing something regarding this which I couldn't understand. Can you please let me know how can i resolve the above error?
Thanks.
Hi,
DeleteDid you try this example https://github.com/biemond/soa11g_examples/tree/master/SOA_Directbinding
and there two ways, the adf binding ( old ) or the new direct binding
thanks
Hi Edwin,
ReplyDeleteI am getting the below error in jdeveloper while testing a wsdl proxy
oracle.xml.parser.v2.XMLDOMException: invalid namespace for prefix
I am using 11.1.1.7.0 jdeveloper version.
My questions are:- Can we create a webservice proxy from a webservice which contain multiple schemas? If yes how?
While I separated the schemas into different filesystem and tried calling from wsdl. Also then I am getting the below error.
"The following invalid value had caused a oracle.xml.parser.v2.XMLDOMException: invalid namespace for prefix ns1"
"The operation cannot be proceed"
Validating service
WARNING: src-resolve: Cannot resolve the name 'p4:OrderProposalMerchandiseCategoriesByStoreIDQueryMessage_sync' to a(n) 'type definition' component.
Generating proxy
WARNING: OWS-00064 Attribute "schemaLocation" is not present on a schema import element.
WARNING: OWS-00064 Attribute "schemaLocation" is not present on a schema import element.
WARNING: src-resolve: Cannot resolve the name 'p4:OrderProposalMerchandiseCategoriesByStoreIDQueryMessage_sync' to a(n) 'type definition' component.
Proxy generation finished
Generation complete.
However in SoapUI, the wsdl has no namespace error.
code uses JAXB which causes each other schemas to overwrite each other classes. ADF is not able to consume it.
Anybody has any solution to this namespace error.
Thanks,
Animesh.
Hi,
DeleteI think the xsd import are too deep, too many or included in a other wsdl's. Does it works in SOAPui
maybe you can try axis or change the wsdl
Good luck
Thanks
Hi Edwin,
ReplyDeleteis it possible to call osb from bpel using sb protocol in osb?.
i think soadirect binding in bpel composit is for accessing this bpel composite natively by using osb protocol in proxy?
Thanks,
Rajashekhar
Hi,
Deleteyes you can call an OSB proxy with t3 (sb = direct binding) from BPEL or call a BPEL from OSB.
Thanks
Hi.
ReplyDeleteI have added similar type of post in my blog with different steps.
http://soawork.blogspot.hk/2014/01/call-restful-service-from-oracle-soa.html
Vivek
Hi I am getting error,
ReplyDeleteC:\Oracle\Middleware_Jdev\jdk160_24\bin\javaw.exe -client -classpath C:\JDeveloper\mywork\TestApp\.adf;C:\JDeveloper\mywork\TestApp\Project2\classes;C:\Oracle\Middleware_Jdev\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel.jar;C:\Oracle\Middleware_Jdev\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime.jar;C:\Oracle\Middleware_Jdev\jdeveloper\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;C:\Oracle\Middleware_Jdev\oracle_common\modules\oracle.fabriccommon_11.1.1\fabric-common.jar;C:\Oracle\Middleware_Jdev\wlserver_10.3\server\lib\weblogic.jar;C:\Oracle\Middleware_Jdev\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-client.jar;C:\Oracle\Middleware_Jdev\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-ext.jar;C:\Oracle\Middleware_Jdev\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\oracle-soa-client-api.jar;C:\Oracle\Middleware_Jdev\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\oracle.soa.fabric.jar -Djavax.net.ssl.trustStore=C:\Oracle\Middleware_Jdev\wlserver_10.3\server\lib\DemoTrust.jks project2.StartProcess
javax.naming.ServiceUnavailableException [Root exception is java.net.UnknownHostException: soaps3.alfa.local]
at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:34)
at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:788)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:366)
at weblogic.jndi.Environment.getContext(Environment.java:315)
at weblogic.jndi.Environment.getContext(Environment.java:285)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.(InitialContext.java:197)
at oracle.soa.management.internal.ejb.EJBLocatorImpl.(EJBLocatorImpl.java:164)
at oracle.soa.management.facade.LocatorFactory.createLocator(LocatorFactory.java:35)
at project2.StartProcess.(StartProcess.java:48)
at project2.StartProcess.main(StartProcess.java:112)
Caused by: java.net.UnknownHostException: soaps3.alfa.local
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:850)
at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1201)
at java.net.InetAddress.getAllByName0(InetAddress.java:1154)
at java.net.InetAddress.getAllByName(InetAddress.java:1084)
at java.net.InetAddress.getAllByName(InetAddress.java:1020)
at weblogic.rjvm.RJVMFinder.getDnsEntries(RJVMFinder.java:422)
at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:192)
at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:170)
at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:153)
at weblogic.jndi.WLInitialContextFactoryDelegate$1.run(WLInitialContextFactoryDelegate.java:345)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:340)
... 11 more
Process exited with exit code 0.
Hi,
Deleteit should be because you are using my test server
update all code with your own environment settings
Hashtable jndiProps = new Hashtable();
jndiProps.put(Context.PROVIDER_URL, "t3://soaps3.alfa.local:8001/soa-infra");
jndiProps.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
jndiProps.put(Context.SECURITY_PRINCIPAL, "weblogic");
jndiProps.put(Context.SECURITY_CREDENTIALS, "weblogic1");
jndiProps.put("dedicated.connection", "true");
thanks
Hi I am getting an error ,
ReplyDelete<[RejectedMsgHandling]Unable to apply policies on the rejected message with id - 220005
javax.xml.ws.WebServiceException: javax.xml.soap.SOAPException: javax.xml.soap.SOAPException: Message send failed: set.by.caller: Name or service not known
at oracle.j2ee.ws.client.jaxws.DispatchImpl.invokeOneWay(DispatchImpl.java:1199)
at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.synchronousInvocationWithRetry(OracleDispatchImpl.java:233)
at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.invokeOneWay(OracleDispatchImpl.java:111)
at oracle.integration.platform.faulthandling.recovery.RejectedMsgWSHandler.execute(RejectedMsgWSHandler.java:116)
at oracle.integration.platform.faulthandling.RejectedMsgRecoveryManagerImpl.recoverFault(RejectedMsgRecoveryManagerImpl.java:371)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at com.sun.proxy.$Proxy365.recoverFault(Unknown Source)
at oracle.integration.platform.faultpolicy.RecoverFault.recoverAndChain(RecoverFault.java:161)
at oracle.integration.platform.faultpolicy.RecoverFault.resolveAndRecover(RecoverFault.java:124)
at oracle.integration.platform.faultpolicy.FaultRecoveryManagerImpl.resolveAndRecover(FaultRecoveryManagerImpl.java:121)
at oracle.integration.platform.faulthandling.RejectedMsgRecoveryManagerImpl.handleRejectedMessage(RejectedMsgRecoveryManagerImpl.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy365.handleRejectedMessage(Unknown Source)
at oracle.integration.platform.instance.InstanceManagerImpl.handleRejectedMessage(InstanceManagerImpl.java:1261)
at oracle.integration.platform.blocks.adapter.fw.jca.mdb.AdapterServiceMDB.onReject(AdapterServiceMDB.java:1633)
at oracle.integration.platform.blocks.adapter.fw.jca.mdb.AdapterServiceMDB.rejectNativeRecord(AdapterServiceMDB.java:1793)
at oracle.integration.platform.blocks.adapter.fw.jca.mdb.AdapterServiceMDB.onReject(AdapterServiceMDB.java:1810)
at oracle.tip.adapter.fw.jca.messageinflow.MessageEndpointImpl.onReject(MessageEndpointImpl.java:652)
at oracle.tip.adapter.mq.inbound.QueueProcessor.rejectBadMessage(QueueProcessor.java:949)
at oracle.tip.adapter.mq.inbound.QueueProcessor.translateMessage(QueueProcessor.java:770)
at oracle.tip.adapter.mq.inbound.QueueProcessor.processIndividualMessage(QueueProcessor.java:429)