Dynamic invocation in Axis
I've deployed two services, one using framework Axis, one using framework Muse(a web service apache project).
I want to make a dynamic invocation from Axis to use an operation of Muse, I add the code in the impl document of Axis. Is it possible to do that?
Thank you in advance.
first of all, you are invoking the webservice with a string, not with xml.
secondly, ditch axis and go read a tutorial on jaxws, it will be 10 times easier.
Similar Messages
-
Error while passing URL Dynamically in SOAP AXIS adapter..!!
Hi ,
Idoc> XI>SOAP-AXIS
I am doing a scenario where I need to pass the URL dynamically in SOAP-AXIS adapter by taking the RCVPRN of Idoc.
If
RCVPRN = 100 , message has to go to http://10.190.25.16:8210/file/receiver
RCVPRN = 200 , message has to go to http://10.190.25.16:8210/file/receiver2
RCVPRN = 300 , message has to go to http://10.190.25.16:8210/file/receiver3
I used the below UDF and it is working correctly and generating the URL dynamically .
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey keyHeader1 = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/SOAP", "TServerLocation");
conf.put(keyHeader1, a);
return "";
The value is coming in SOAP document as expected like below.
<sap:DynamicConfiguration xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
<sap:Record namespace="http://sap.com/xi/XI/System/SOAP" name="TServerLocation">http://10.190.25.16:8210/file/receiver3</sap:Record>
</sap:DynamicConfiguration>
I used the below Configuration modules in receiver SOAP-AXIS adapter as suggested in Note 1028961.
AF_Adapters/axis/AFAdapterBean ---> afreq
AF_Adapters/axis/HandlerBean ---> xireq
AF_Adapters/axis/HandlerBean ---> dc
AF_Adapters/axis/HandlerBean ---> remover
AF_Adapters/axis/HandlerBean ---> trp
AF_Adapters/axis/HandlerBean ---> xires
AF_Adapters/axis/AFAdapterBean ---> afres
xireq -> handler.type-> java:com.sap.aii.axis.xi.XI30OutboundHandler
dc -> handler.type-> javasap.aii.axis.xi.XI30DynamicConfigurationHandler
dc ---> key.1 ---> write http://sap.com/xi/XI/System/SOAP TServerLocation
dc ---> location.1 ---> context
dc ---> value.1 ---> transport.url
remover ---> handler.type ---> java:com.sap.aii.axis.soap.HeaderRemovalHandler
remover ---> namespace ---> http://sap.com/xi/XI/Message/30
trp ---> handler.type ---> java:com.sap.aii.adapter.axis.ra.transport.http.HTTPSender
trp ---> module.pivot ---> true
xires ---> handler.type ---> java:com.sap.aii.axis.xi.XI30OutboundHandler
and I am getting the below error in SOAP-AXIS channel at the point java:com.sap.aii.adapter.axis.ra.transport.http.HTTPSender.
2009-03-02 15:23:44 Success Axis: getting handler trp of java:com.sap.aii.adapter.axis.ra.transport.http.HTTPSender
2009-03-02 15:23:45 Error Axis: error in invocation: (500)internal server error
2009-03-02 15:23:45 Error MP: Exception caught with cause (500)internal server error
2009-03-02 15:23:45 Error Exception caught by adapter framework: (500)internal server error
2009-03-02 15:23:46 Error Delivery of the message to the application using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: (500)internal server error: (500)internal server error.
2009-03-02 15:23:46 Error The message status set to NDLV.
Kindly let me know if anyone has any idea what might be wrong?
Note : The given URL is correct one because I cross checked by passing them normally by giving directly in adapter and they are all working and the message is going to receiver.
Thanks
DeepthiHi Stefan,
>> dc -> handler.type-> javasap.aii.axis.xi.XI30DynamicConfigurationHandler
>> dc ---> key.1 ---> write http://sap.com/xi/XI/System/SOAP TServerLocation
>> dc ---> location.1 ---> context
>> dc ---> value.1 ---> transport.url
>> Try read instead of write
When I tried with this, I am getting the below error "Connection refused ".
Success Axis: entering HandlerBean
Success Axis: getting handler trp of java:com.sap.aii.adapter.axis.ra.transport.http.HTTPSender
Error Axis: error in invocation: java.net.ConnectException: Connection refused
Error MP: Exception caught with cause java.net.ConnectException: Connection refused
Error Exception caught by adapter framework: ; nested exception is: java.net.ConnectException: Connection refused
Error Delivery of the message to the application using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: ; nested exception is: java.net.ConnectException: Connection refused: java.net.ConnectException: Connection refused.
Success The message status set to WAIT.
It is going successfully when I tried sending directly. Looks like Dynamic Configuration is not working for SOAP-AXIS.
Any Suggestion?
Thanks
Deepthi. -
Setting the charset in dynamic invocation
I'm on WLS 8.1 SP1. The doc (http://e-docs.bea.com/wls/docs81/webserv/i18n.html)
shows how to set the charset attribute of the Content-Type HTTP header via the
client stub. But I am not using client stubs, I'm using dynamic invocation. So
how do I accomplish the equivalent? I don't see an obvious javax.xml.rpc.Call
property field for this.
TIA...
MarkThe trouble with this example is that it doesn't use JAX-RPC dynamic invocation.
The attachment contains an example of what I am trying to do. The method of interest
is case3(), in which. on lines 294-296, is an (unsuccessful) attempt to set the
character set. The other methods of interest here are getEMAExceptionServices()
(which creates the javax.xml.rpc.Service object) and getUpdateExceptionResolutionStatusCall(Service
iService) (which creates the javax.xml.rpc.Call object).
[OK, this time I attached something.]
-- Mark --
Bruce Stephens <[email protected]> wrote:
Hi Mark,
Take a quick look at Manoj's Mega example [1] and see if this clears
things up. If not, post your code and we can take a look, or speak to
our outstanding support team: http://support.bea.com or [email protected]
Thanks,
Bruce
[1]
http://manojc.com/tutorial/mega/client/BindingProperties.java
Mark Shaffer wrote:
Bruce,
If I try to get the "weblogic.webservice.bindinginfo" property froma Call object,
this exception is thrown:
javax.xml.rpc.JAXRPCException: unknown property: weblogic.webservice.bindinginfo
at weblogic.webservice.core.rpc.CallImpl.getProperty(CallImpl.java:322)
-- Mark --
Bruce Stephens <[email protected]> wrote:
Hi Mark,
Did you try the code in the doc?
import weblogic.webservice.binding.BindingInfo;
BindingInfo info =
(BindingInfo)stub._getProperty("weblogic.webservice.bindinginfo" );
// The following method sets the Content-Type HTTP header
info.setCharset( "UTF-8" );
port.helloWorld();
Thanks,
Bruce
Mark Shaffer wrote:
Bruce,
OK, but the disconnect here is that I don't have a BindingInfo object,nor do
I know how to obtain one. All I have is javax.xml.rpc.* objects.
-- Mark --
Bruce Stephens <[email protected]> wrote:
Hi Mark,
Your client application can specify the character set that it would
prefer the Web Service to use in its response by using the
weblogic.webservice.binding.BindingInfo.setAcceptCharset() method.
See: http://e-docs.bea.com/wls/docs81/webserv/i18n.html#1069629
There is example code there as well.
Hope this helps,
Bruce
Mark Shaffer wrote:
I'm on WLS 8.1 SP1. The doc (http://e-docs.bea.com/wls/docs81/webserv/i18n.html)
shows how to set the charset attribute of the Content-Type HTTP
header
via the
client stub. But I am not using client stubs, I'm using dynamic
invocation.
So
how do I accomplish the equivalent? I don't see an obvious javax.xml.rpc.Call
property field for this.
TIA...
Mark
[UTEMAExceptionServices.java] -
Problem with Dynamic Invocation of Webservice
Hi,
I am trying to use Dynamic Invocation Of Webservice, as defined in the following link .
"http://download.oracle.com/docs/cd/B14099_19/web.1012/b14027/xhtmlstrm.htm#i1010275"
I have written standalone java client program to invoke, while invoking i got the error as follows :
Exception in thread "main" java.lang.NoSuchFieldError: FAULT_CODE_IOEXCEPTION
at oracle.soap.transport.http.OracleSOAPHTTPConnection.send(OracleSOAPHTTPConnection.java:765)
at org.apache.soap.rpc.Call.invoke(Call.java:248)
at oracle.ds.v2.impl.adaptor.protocol.soap.DsSoapRpcHandler.execute(DsSoapRpcHandler.java:93)
at oracle.ds.v2.impl.adaptor.protocol.soap.DsSoapHandler.execute(DsSoapHandler.java:130)
at oracle.ds.v2.impl.adaptor.protocol.soap.DsSoapProtocolAdaptor.process(DsSoapProtocolAdaptor.java:134)
at oracle.ds.v2.impl.engine.ProtocolManager.process(ProtocolManager.java:69)
at oracle.ds.v2.impl.engine.DefaultManagerExecutionContext.executeProtocolAdaptor(DefaultManagerExecutionContext.java:382)
at oracle.ds.v2.impl.adaptor.execution.DummyExecutionAdaptor.process(DummyExecutionAdaptor.java:54)
at oracle.ds.v2.impl.engine.ExecutionManager.process(ExecutionManager.java:393)
at oracle.ds.v2.impl.engine.ExecutionManager.doExecute(ExecutionManager.java:348)
at oracle.ds.v2.impl.engine.ExecutionManager.execute(ExecutionManager.java:259)
at oracle.ds.v2.impl.connection.DefaultDsConnection.execute(DefaultDsConnection.java:162)
at oracle.j2ee.ws.client.impl.DefaultWebServiceMethod.execute(DefaultWebServiceMethod.java:192)
at oracle.j2ee.ws.client.impl.DefaultWebServiceMethod.invoke(DefaultWebServiceMethod.java:160)
at com.sub.atl.dynamicws.DynamicWS.wsdlDetails(DynamicWS.java:102)
at com.sub.atl.dynamicws.DynamicWS.main(DynamicWS.java:19)
Can, any one help to solve this error.What does your code look like?
By the error it appears you are trying to access a field called "FAULT_CODE_IOEXCEPTION" which doesn't exist. -
Web Services Dynamic Invocation
Hi,
I am trying to find a way to do web services dynamic invocation where params and return type can be complex types.
The process I intent to follow is, query a uddi registry based on some search criteria to get a reference to the service wsdl. Use maybe wsdl4j to introspect the wsdl to determine porttype, operations, param data types etc and then perform a dynamic invocation.
Does anybody have any ideas on how best this can be achieved without having to reinvent the wheel.
Thanks,
-VHi
I am looking for the same thing, please let me know if you resolve it.
thanks -
Dynamic Invocation: Error The SOAP PA receives a SOAP Fault from SOAP serve
Hi All,
I am trying to run the sample code "Dynamic Invocation of Oracle9i Web Services using Oracle UDDI registry"
I was able to run the web services, publish them, and inquiry them using local UDDI registry.
However, while invoking any method provided by the web services using the inovk method I get the following error
oracle.j2ee.ws.client.WebServiceProxyException: Invocation failed 5,100: The SOAP PA receives a SOAP Fault from SOAP server
Can anybody help me please?
Regards,
S.Al ShamsiIt looks like the problem is occuring on the server side. I guess you have included the stacktrace from the client, can you get hold of the server side stacktrace?
-
Reg@ Dynamic invocation of Webservices using an Single Invoke
Hi ,
I am trying to implement Dynamic invocation of webservices using a single Invoke .
Say , i have three webservices = WebA,WebB and Webc .Based on Logic , i need to invoke either of the webservice with an single Invoke .
In [ ws-addressing.xsd ] there are different elements ,"Address" is for endpoint URL.PortType??ServiceName ?? .
If i need to make use of this XSD can any one help me to map the WSDL components to this XSD Or lease suggest options if any ??
Regards ,
Nagahttp://blogs.oracle.com/dasoa/2010/09/11g_dynamic_partnerlink_example.html
see the article he's refering too
eventually you need something like :
<assign>
<copy>
<from>
<EndpointReference xmlns="http://schemas.xmlsoap.org/ws/2003/03/addressing">
<Address>http://localhost:9700/orabpel/default/UnitedLoan</Address>
<ServiceName
xmlns:ns1="http://services.otn.com">ns1:UnitedLoan</ServiceName>
</EndpointReference>
</from>
<to variable="partnerReference"/>
</copy>
</assign> -
Array of String for input paramter + dynamic invocation
Does anybody know a place I can find an example of web service
using the following methods:
1. Array of String as input parameter
2. Client uses dynamic invocation
Specifically, 1. how do I define the parameter type in web-services.xml?
2. how do I refer to the type in a client code?
Thanks,
HongHello,
The doclitparam interop round 3 example does a echo string array.
http://dev2dev.bea.com/managed_content/direct/webservice/r3server.zip
Also there is a DII example in the WebService Wizard's archive:
http://dev2dev.bea.com/managed_content/direct/webservice/wswa.html#qz29
HTH,
Bruce
Hong wrote:
Does anybody know a place I can find an example of web service
using the following methods:
1. Array of String as input parameter
2. Client uses dynamic invocation
Specifically, 1. how do I define the parameter type in web-services.xml?
2. how do I refer to the type in a client code?
Thanks,
Hong -
Step by step installation for Web Services Dynamic Invocation application?
please let me know the step by step process to install the Web Services Dynamic Invocation application Sample code.The install.htm that comes with the download does not give enough information.
Thanks in Advance
ShyamSorry for the confusion,i got hold of the right document.
Thanks
Shyam -
Dynamic changes on axis limits
hi, for each charts, we can set the "Axis Limits" (under "Axis Scaling" property")
by chosing "Specify manually", we can set "Minimum value" and "Maximum value" manually.
but it is "hardcoded".
is it possible to have:
the minimum value or maximun value are dynamically changed by the exact minimum value and the exact maximum value from the column (data source) ??
therefore , if the data changes, user dont need to set again
(although "Zoom to data range" is an alternative but the result is not very good)I think it is impossible , so I close this thread, thanks
-
Dynamicly set y axis on graph with 0 always being in center
i have a report that i want to dynamicly set the y axis as the values change from contract to contract. but i want to maintain that 0 will always be in the center of the graph.
if i use the auto range and auto scale it shifts 0 away from the center.
any ideas?Don't use auto range?
Sorry, I don't mean to be a smart-alec, but Crystal's charts are not very flexable. I understand they are working on it.
Debi -
Dynamic Invocation Of EJB's ?
I am intending to write a dispatcher class that takes the name of an EJB at
runtime and then looks up and invokes a method on the EJB. I was intending
to
create a simple interface that the EJB will implement something like:-
public interface DynamicEJBDef
public void dynamicMethod() throws Exception;
The dynamic method would be implemented in the Bean class and thus the
Remote class.
Then to invoke I was thinking of something like the following:-
String ejbJNDIName = "testEJB";
EJBHome ejbHome = (EJBHome) ctx.lookup(ejbJNDIName);
DynamicEJBDef ejbObj = (DynamicEJBDef) ejbHome.create();
ejbObj.dynamicMethod();
Has anyone done this before ? Will it work and if not any other
suggestions...?
TIAWe did this a couple of year ago with a servlet that called a
'GenericRequestHandler' class. The servlet was passed an xml message in the
request that had a header that contained the request type. The data for the
request was in a body portion of the xml message. We used the information in
the header to call a request handler factory class that returned a request
handler that would deal with the message type. Most of the time, if the request
was generic enough, it returned the 'GenericRequestHandler'. If the request was
more complex, the factory would return a specific request handler. The request
handler classes all implemented the same interface and used the header info to
map to a jndi lookup of an entity ejb, and a call to an appropriate method on
the entity ejb. It was great if all of the requests were of a generic nature.
Kind of a poor man's SOAP request.
The hassle was parsing all the xml and figuring out what to do in the factory,
as well as, writing the specific request handlers when the requests got more
complex. The specific request handlers got pretty involved.
I don't have access to the code....and if I did I couldn't give it to you....or
they would kill me. ;-)
But, it worked.
Bill
Martin J Porter wrote:
I am intending to write a dispatcher class that takes the name of an EJB at
runtime and then looks up and invokes a method on the EJB. I was intending
to
create a simple interface that the EJB will implement something like:-
public interface DynamicEJBDef
public void dynamicMethod() throws Exception;
The dynamic method would be implemented in the Bean class and thus the
Remote class.
Then to invoke I was thinking of something like the following:-
String ejbJNDIName = "testEJB";
EJBHome ejbHome = (EJBHome) ctx.lookup(ejbJNDIName);
DynamicEJBDef ejbObj = (DynamicEJBDef) ejbHome.create();
ejbObj.dynamicMethod();
Has anyone done this before ? Will it work and if not any other
suggestions...?
TIA -
Dynamic invocation of javac with custom class path.
To all the Java Gurus out there,
Consider the following classes:
XYZ/test/TestUtil.java
package test;
class TestUtil {
void useMe() {
}ABC/test/Test.java
package test;
public class Test {
public static void main(String[] args) {
TestUtil t = new TestUtil();
t.useMe();
}The class Test uses package private access to the TestUtil.useMe() method. Then the Test class is packaged into test.jar and the TestUtil class is packaged into testutil.jar.
Our application uses a custom class loader architecture where the test.jar is loaded by class loader "X" and testutil.jar is loaded by class loader "Y". Also Y is the parent class loader of X. When the main() of Test class is run it results into IllegalAccessException as the package private method is being accessed from different class loaders.
We are currently using a dynamic way to detect the dependency between test.jar and testutil.jar and generating the classpath argument to the "javac" ant task which dyncamically invokes the sun.tools.javac.Main class. So while compiling Test class the following command line is generated:
javac -classpath XYZ/testutil.jar Test.java
It compiles fine assuming that the Test class and the TestUtil class are loaded by the same class loader but at runtime this fails.
Is there a way to make "javac" use our runtime class loader architecture to instead of static classpath, so that the access violation is captured at compile time?
Any help is appreciated.
Ravi
PS: If this is not the right forum please point me to the right place to post this questions.Not that I'm aware of - the Java Language is designed to be platform-independent so absolute file paths which is a specific feature of various file systems would naturally not to be mixed up with the object-oriented hierarchy structure.
Just like a compiler wouldn't check if a file exists in
new File("<FilePath>")I don't think you can get compile-time checks for what you have wanted.
Hope this helps~
Alex Lam S.L. -
Dynamic Invocation of popups ?
I have a table which is created dynamically using the <netui-data:repeater > tags.
I have made the 1st column to be a column of hyperlinks. Following is the code that I am using.
<netui-data:repeaterItem>
<tr class="contenteven" onmouseover="this.className='mouseovercolor'" onmouseout="this.className='mouseoutcolor'">
<td><span><netui:label id=" %i++;%>" styleClass="labell" value="{container.item.strSR_NBR}" >
</netui:label></td>
<td align="center"><netui:label value="{container.item.strDATE}">
</netui:label></td>
<td align="center"><netui:label value="{container.item.strNAME}">
</netui:label></td>
</tr>
</netui-data:repeaterItem>
It prints:
SR# DATE NAME
15-34534-345 2004/09/27 Smith Will
15-34534-333 2004/09/27 JOHN Brawny
15-34534-332 2004/09/27 JOEY TRIBIANNI
Please keep in mind that the table length will vary everytime.
What I want is that, on clicking the 1st row 1st column, it should open a page which will display more information about row 1.
I just don't know how can I keep track of the row which the user will click. I have tried various options but haven't got it to work yet. Please let me know if you have ay more suggestions.
Thanks in advance!It looks like "{container.item.strSR_NBR}" is the unique identifier for each of your items. So, it seems like what you need to do is construct a URL that includes that id as a request parameter. Something like:
<netui:anchor action="..." target="details">
<netui:parameter name="srNbr" value="{container.item.strSR_NBR}"/>
<netui:label value="{container.item.strSR_NBR}" ... />
</netui:anchor> Kris -
Dear all,
Any hints in dynamic calling a method for an assigned class like..
myclass a=new myclass();
a.setcolor("red");
String mymethodname="getcolor";
how to call a."mymethodname"??
If using the Class.forName, and getMethods(), then I need to use "invoke" for every method before calling the dynamic calling method. Any simpler way?
regards,
coderNo, you have to use refection.
MyColourfulObject a = new MyColourfulObject();
Class clazz = a.class;
Method method = clazz.getMethod( "getColour", new Class[] {} );
Object o = method.invoke( a, null );
Maybe you are looking for
-
In purchase info record in deletion flag i tick the check delete info record. if i do this values from info record will not come when i create purchase order. What are the other ways values are coming to my purchase order if the info record for that
-
Mapping function module paramters dynamically with a selection screen
Hi Experts, I got a situation, i am maintaining data of a function module paramters in a dictionary table. in the screen pbo i will fetch the the fm data from that table into the internal table(ITAB). in my report screen i am having the selection scr
-
On my desktop I'm running win7 64bit and my scanner is CanoScan 8400f. It worked ok with pse 11, so I installe pse13 and the so the "fun" stared. When trying to import image it sayes "No WIA compatibele devices were detected etc". I have tried suppor
-
hello everybody we r using oracle 9.2.0.1 and inventory application (designed on vb) in application lookup from is there , in that lookup from we r not getting the data , that lookup form query the from minvitemmaster table , that table is exist in d
-
Set up asyncronous correlation to MSMQ / Dynamics AX2012
Hi Pros, I am using the MSMQ-Adapter to send an async. message to Dynamics AX2012. The message is processed by AX and the response is put to an outbound MSMQ directory. BizTalk receives the response but i have problems setting up a working correlatio