Programmatically call ADF Webservice (dynamic Call)
Hi All,
My requirement is to call/Invoke a webservice(Sync ADF Webservice) in ApplicationModuleImpl Class. The service WSDL name & method name are sent to my method as params.
how to invoke it programmatically?
Note: These params are known at runtime only. And there are many services in Dev environment.
Thanks in Advance.
Hello,
Here is an example of a utility that I use to submit SOAP requests dynamically. Focus on the createSOAPRequest() and sendRequest() methods. The execute method is used for implementing this object as a Quartz Job.
The execute() method contains several getString method calls - this is what makes the requests dynamic:
String endpointUrl = dataMap.getString("endpointUrl");
String soapAction = dataMap.getString("soapAction");
String requestXml = dataMap.getString("requestXml");
String resultPath = dataMap.getString("resultPath");
Here are examples of what would be in each of these strings:
endpointUrl - http://hostname:port/endpointurl
requestXml -
<soap:Envelope xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">
<soap:Body>
<ns1:process xmlns:ns1=""http://xmlns.oracle.com/yournamespace"">
<ns1:input />
</ns1:process>
</soap:Body>
</soap:Envelope>
resultPath - result
soapAction - process
package scheduler.jobs.soap;
import java.io.StringReader;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.MimeHeaders;
import javax.xml.soap.SOAPConnection;
import javax.xml.soap.SOAPConnectionFactory;
import javax.xml.soap.SOAPMessage;
import javax.xml.soap.SOAPPart;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMResult;
import javax.xml.transform.dom.DOMSource;
import oracle.xml.parser.v2.XMLElement;
import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.w3c.dom.Document;
import org.w3c.dom.ls.DOMImplementationLS;
import org.w3c.dom.ls.LSSerializer;
import org.xml.sax.InputSource;
public class SOAPRequestJob implements Job {
private final static Logger LOGGER =
Logger.getLogger(SOAPRequestJob.class.getName());
private static final String NEW_LINE = "\r\n";
public void execute(JobExecutionContext jobExecutionContext) {
try {
// get job details
JobDataMap dataMap =
jobExecutionContext.getJobDetail().getJobDataMap();
String endpointUrl = dataMap.getString("endpointUrl");
String soapAction = dataMap.getString("soapAction");
String requestXml = dataMap.getString("requestXml");
String resultPath = dataMap.getString("resultPath");
jobExecutionContext.setResult(sendRequest(endpointUrl, createSOAPRequest(soapAction, requestXml), resultPath));
} catch (Exception e) {
LOGGER.log(Level.SEVERE, e.toString(), e);
jobExecutionContext.setResult("FAILURE - Due to exception " + e);
private static SOAPMessage createSOAPRequest(String soapAction, String requestXml) throws Exception {
// Use weblogic MessageFactoryImpl which supports SAAJ 1.3
SOAPMessage soapMessage = MessageFactory.newInstance().createMessage();
MimeHeaders headers = soapMessage.getMimeHeaders();
headers.addHeader("SOAPAction", soapAction);
SOAPPart soapPart = soapMessage.getSOAPPart();
DocumentBuilder builder =
DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(requestXml)));
DOMSource domSource = new DOMSource(document);
soapPart.setContent(domSource);
soapMessage.saveChanges();
return soapMessage;
private static String sendRequest(String endpointUrl, SOAPMessage soapMessage, String resultPath) throws Exception {
// send the request to the appropriate endpoint and return the result as identified in resultPath
SOAPConnection soapConnection = SOAPConnectionFactory.newInstance().createConnection();
SOAPMessage soapResponse = soapConnection.call(soapMessage, endpointUrl);
soapConnection.close();
Source src = soapResponse.getSOAPPart().getContent();
TransformerFactory tf = TransformerFactory.newInstance();
Transformer transformer = tf.newTransformer();
DOMResult result = new DOMResult();
transformer.transform(src, result);
Document doc = (Document)result.getNode();
XMLElement rootElem = (XMLElement)doc.getDocumentElement().getElementsByTagName("Body").item(0);
XMLElement elem = rootElem;
String retVal = null;
try {
if (resultPath != null && resultPath.trim().length() > 0) {
// result path specified, traverse the xml document
String searchPath = resultPath;
if (searchPath.substring(0,1).equals("/")) {
// strip off leading "/"
searchPath = searchPath.substring(1);
for (String nodeName : searchPath.split("/")) {
elem = (XMLElement) elem.getElementsByTagName(nodeName).item(0);
retVal = elem.getText();
} catch (Exception e) {
DOMImplementationLS domImplLS = (DOMImplementationLS) doc.getImplementation();
LSSerializer serializer = domImplLS.createLSSerializer();
String str = serializer.writeToString(doc);
retVal = "Unable to extract result path " + resultPath + " from SOAP Response: " +
NEW_LINE + str;
return retVal;
Similar Messages
-
How to retrieve the caller of a dynamically called vi?
Hi,
following situation:
A vi is loaded dynamically into a subpanel on the panel of the calling vi using the "run vi" property node. The called vi needs to know by what vi it was called. As we can learn from some contributions in the discussion forum or from own experiments, the name of the calling vi is only contained in the array given by the "Callers' Names" property node if the vi is called "by reference". If it is called by the "run vi" property node, then there seems to be no way to find out the identity of the caller from inside the vi that is being called. Is there at least any solution that makes use of the fact that the called vi is running in a subpanel on the panel of the caller? Is there a property to read from inside the called vi the identity of the subpanel the called vi is running in?
Because my explanation has probably already become rather confusing, I am attaching a simple example.
Peter
Solved!
Go to Solution.
Attachments:
caller_vi.vi 13 KB
called_vi.vi 7 KBI don't think there is a way to do that because as far as the VI in the panel is concerned, it's running as a top-level VI. One workardound is to use a control. When calling the VI use the VI Server to set the value of the control (with the Control Value -> Set method) to the name of the VI that's calling the VI. True, it requires you to use a control, but it's not that bad of a workaround.
-
I would like to create child components of the component
based on a XML which is retrieved by WebService/HttpService call.
createChildren() is the one to be used to create components
dynamically. But if I use createChildren() and call a
WS/HttpService request in createChildren method, I can not get the
result of WS/HttpService request in createChildren().
It seems that the result event is processed later after
createChildren() is completed.
How can I implement my requirement?
I would appreciate any pointer or suggestion.
Best regards
Masa1) Use a List, with a custom itemRenderer
2) Use a Repeater (Probably easiest)
3) use Actionscript to addChild() components.
Tracy -
Hi guys,
I have a webservice that is deployed, running and working on a Weblogic Server (lets for now use my localhost and port 7001).
I want to create a simple client in Java to call it and use the information it returns. I used the same code on another service and it worked, but this service accepts a string and returns a string - easy.
My webservice returns a List of objects. The objects are of a type that I defined as SchemeExclusionApplicabilityVO. I read that I need to use the "MapTypes" and "QName" methods in order to define my types, but I can't get it right. I don't know where to look up the values to pass as parameters. I have the wsdl file and also the xml that gets returned as result. Pasted my test code below. If it will help - let me know and I can paste an extract of the wsdl and/or resultant soap message.
This is the error that I get:
SOAP-ENV:Client, No Deserializer found to deserialize a ':result' using encoding style 'http://schemas.xmlsoap.org/soap/encoding/'
(I know there are other tools that makes this easier, but I would like to get this to work. Has it got something to do with the fact that I might need to map the List first and then my other types?)
CODE:
URL url = new URL( "http://localhost:7001/XXX/ExclusionService/ChronicExclusionService" );
String urn = "urn:demo1:exchange"; //NOT SURE OF THIS ONE - LEFT IT LIKE THE EXAMPLE I FOUND
Call call = new Call();
SOAPMappingRegistry smr = new SOAPMappingRegistry();
BeanSerializer beanSer = new BeanSerializer();
//DONT KNOW IF THE STATEMENT BELOW IS CORRECT - DOUBT IT
smr.mapTypes(Constants.NS_URI_SOAP_ENC,
new QName("java:za.co.xxx.benefitScheme.services.vo", "SchemeExclusionApplicabilityVO"),
SchemeExclusionApplicabilityVO.class, beanSer, beanSer);
call.setTargetObjectURI( urn );
call.setMethodName( "getAllApplicableExclusionsPerDiagnosis" );
call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
call.setSOAPMappingRegistry(smr);
Vector params = new Vector();
params.addElement( new Parameter( "string", String.class, "80000", Constants.NS_URI_SOAP_ENC ) );
params.addElement( new Parameter( "string0", String.class, "0", Constants.NS_URI_SOAP_ENC ) );
params.addElement( new Parameter( "string1", String.class, "7777", Constants.NS_URI_SOAP_ENC ) );
params.addElement( new Parameter( "string2", String.class, "20060610", Constants.NS_URI_SOAP_ENC ) );
call.setParams( params );
Response response = call.invoke( url, "" );hi Jideofor
see also forum thread "ADF binding on Web Service Data Controls"
ADF binding on Web Service Data Controls
If you found examples or documentation of using an ADF Model Data Control on a "non trivial" Web Service, please update this forum thread.
many thanks
Jan Vervecken -
How to call a webservice by creating a datcontroller.
Hi All,
I do have the following requirement in my JSF Page.
I have a refresh button on my screen. When we click on this button it has to automatically call the webservice and display the results.
Can I acheive this by creating a datacontroller in ADF. If so how should I proceed on this.
Thanks in advanceThis demo will show you the basics:
http://www.oracle.com/technology/products/jdev/viewlets/1013/WebServicesAndADF_viewlet_swf.html -
Is it possible to call a webservice with just the url to its WSDL
hi all
can anyone tell me if it is possible to call a webservice with just the url to its WSDL file. must we create the proxy class for webservice client? thanksif you are in the context of a J2EE 1.4 container, you do not need to generate any stub, you can use either a dynamic proxy mechanism or dynamic invocation.
check JWSDP tutorial. -
How does the ADF support romote call method between two managed server ?
How does the ADF support romote call method between two managed server ?
You would usually use this as a WebService through the WSDL that is exposed.
JDeveloper can help you create a Java Proxy to call the Web service if you point it to the WSDL file that was generated for your AM.
Some other samples here:
http://www.connotea.org/user/jdeveloper/tag/Service%20Interface -
How To call java WebService with flex.
Hi Friends
can any body guide me how to use webservices that call java at server side.i have experience of http service dont know how to call the webservices.please give me a basic demo on both side(java and flex).i am using eclipse ide for java and flex.
Thanks in advance
Vineet oshoThe ADF Mobile Container Utilities API may be used from JavaScript or Java.
Application Container APIs - 11g Release 2 (11.1.2.4.0) -
How to call SAP Webservice in standalone java program
Hi,
In our Java application, we want to use the SAP Webservices. I dont know much about authentication mechanism used by SAP. Can any one please help me with any sample code how to Call SAP webservice in Standalone Jave Program. I searched alot on the web regarding this, but helpless. Please help me.
Thanks,
MohanHi Mohan,
You need an account for the ES Workplace. I'm afraid this is not free, e.g. check [SAP NetWeaver, Composition Subscription|https://www.sdn.sap.com/irj/sdn/subscriptions/composition].
But I thought you wanted to play with a WSDL [you already had at hand|Sample code to access BAPI Web services from JAVA required;? -
Here's the problem. Dynamically called VI becomes broken inside an executable in debug executable mode Error 1003 is occuring from "Open VI Reference" Block. The computer has all of the necessary drivers, NI-VISA and NI-DAQmx. This executable is a new release of software that currently works on the PC in question. I can using NI-VISA Remote Server control the instruments from my PC using the executable. But when I put the executable on the PC I am getting this error. The only way I have been able to get this to work properly is to build the executable from the console I believe the project was created in, note that the project file has been moved to a network drive and it still works. All of the stations I have opened the project in show the VI that is being called is runnable. I've tried building the executable from the console I am deploying to and the same thing happens.
I am honestly at a loss for ideas why this is occuring. Is this something about the way LabView works internally that may be causing this problem?
I have trolled this forum for idea's and none have made sense to me.
Any input would be greatly appreciated.
-NateTwo ideas:
Mass compile the project to ensure all linkages are ironed out
Include the dynamically launched VI's into the "Always Included" section of the build spec
Report back on if either of these actions solves your problem.
a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"] {color: black;} a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"]:after {content: '';} .jrd-sig {height: 80px; overflow: visible;} .jrd-sig-deploy {float:left; opacity:0.2;} .jrd-sig-img {float:right; opacity:0.2;} .jrd-sig-img:hover {opacity:0.8;} .jrd-sig-deploy:hover {opacity:0.8;} -
How to edit a program dynamically called from another program
Hi all,
Can anyone help me in coding for a program which call's another
report dynamically from selection screen(for instance z_dynam_called)
and retreive the whole content of the dynamically called program(z_dynam_called)
into an internal table and replace the contents of the internal table with some new code and put it back in z_dynam_called and save it.
Thanks in advance.
Needful will be rewarded with pointsHi,
Follow this:
1) U can pass data from one program to another in a single login using SAP memory......
2) u can create a DBtable update dat table using ur first pgm and fetch from second program.....
3) U can pass the report output using EXPORT TO MEMORY addition and get it back using IMPORT FROM MEMORY..........
Eg:
Export the selected rows to the next program
EXPORT final TO MEMORY ID 'ABC'.
CALL TRANSACTION 'XXX'.
XXX is the tcode for the other program where u want to import the values.
In the second program
INITIALIZATION.
IMPORT the internal table from the first program
IMPORT final FROM MEMORY ID 'ABC'.
Thanks and Regards,
Reward If Helpful -
Error while calling PI webservice from EJB
Hi Experts,
We are getting exception while calling PI webservice from EJB which is deployed in CE 7.2. Earlier we used to call the same webservice but from different PI system at that it worked fine. Now we have changed the consumer proxies required in CE and tried to call from CE and it is throwing error. We have checked usernames and passwords that we are using to call the service and that is working fine. PI team tested from their side and li is also fine. We have also restarted the CE system but invain. Can somebody help on this. The below is the trace that we got.
Location: com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding
Text: Connection IO Exception. Check nested exception for details. (Connection reset).
[EXCEPTION]
com.sap.engine.services.webservices.espbase.client.bindings.exceptions.TransportBindingException: Connection IO Exception. Check nested exception for details. (Connection reset).
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.outputSOAPMessage(SOAPTransportBinding.java:419)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call_SOAP(SOAPTransportBinding.java:1364)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.callWOLogging(SOAPTransportBinding.java:990)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call(SOAPTransportBinding.java:944)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.processTransportBindingCall(WSInvocationHandler.java:168)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEISyncMethod(WSInvocationHandler.java:121)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEIMethod(WSInvocationHandler.java:84)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invoke(WSInvocationHandler.java:65)
at $Proxy780.mioaRDMDataDistribution(Unknown Source)
at com.MDMEventListener.callToPIWS(MDMEventListener.java:100)
at com.MDMEventListener.ListenerMethod(MDMEventListener.java:173)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:47)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_WS.invoke(Interceptors_WS.java:31)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:39)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:23)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:25)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:17)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:138)
at com.sap.engine.services.ejb3.webservice.impl.DefaultImplementationContainer.invokeMethod(DefaultImplementationContainer.java:203)
at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process0(RuntimeProcessingEnvironment.java:730)
at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.preProcess(RuntimeProcessingEnvironment.java:682)
at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process(RuntimeProcessingEnvironment.java:324)
at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPostWOLogging(ServletDispatcherImpl.java:199)
at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:65)
at com.sap.engine.services.webservices.servlet.SoapServlet.doPost(SoapServlet.java:61)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:152)
at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:38)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:404)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:204)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:440)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:429)
at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:38)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:82)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:268)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:81)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:54)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:42)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:447)
at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:264)
at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:56)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)
at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.readLine(HTTPSocket.java:950)
at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.getInputStream(HTTPSocket.java:414)
at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.getResponseCode(HTTPSocket.java:319)
at com.sap.engine.services.webservices.espbase.client.bindings.ClientHTTPTransport.getResponseCode(ClientHTTPTransport.java:209)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.outputSOAPMessage(SOAPTransportBinding.java:385)
... 78 more
Regards,
PradeepHi Pradeep,
this looks like if the server is not reachable. Have you checked if both server are able to communicate? Maybe firewall rules block the request.
Regards,
Tobias -
Error getting while calling a webService from XI
Hi
We are getting the follwoing error while calling a webservice from XI. We Could call the same webservice from XML spy. Have checked the SOAP adapter it was running fine and the communication channel parameters too.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Inbound Message --> <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1"><SAP:Category>XIAdapterFramework</SAP:Category><SAP:Code area="MESSAGE">GENERAL</SAP:Code><SAP:P1/><SAP:P2/><SAP:P3/><SAP:P4/><SAP:AdditionalText>com.sap.aii.af.ra.ms.api.MessagingException: SOAP: response message contains an error Application/UNKNOWN/APPLICATION_ERROR - application fault: com.sap.aii.af.ra.ms.api.RecoverableException: SOAP: response message contains an error Application/UNKNOWN/APPLICATION_ERROR - application fault</SAP:AdditionalText><SAP:ApplicationFaultMessage namespace=""/><SAP:Stack/><SAP:Retry>M</SAP:Retry></SAP:Error>
Please try to help.
Thanks
RameshHi
Thanks a lot for your kind support.
Hi Moorthy
We have created one Asyn MI and wrapped the external definition into that, Haven't done any mapping for responce. Please find the trace below.
Hi Bhavesh
It was great helpful link but the payload days is not visible for this message it was containing details about sending. For some other message i could see payload.
I Could see one differnce in the XML Spy and "XI payload before entering SOAP Adapter"
The following line doesnt appear in the XI payload.
<m:StatusUpdate xmlns:m="http://localhost/StatusUpdate" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
</m:StatusUpdate>
Is this line would be embeded in the SOAP Adapter??? Please find the trace below. Please help me if you have any additional info.
The message was successfully received by the messaging system. Profile: XI URL: Using connection AFW. Trying to put the message into the receive queue.
Message successfully put into the queue.
The message was successfully retrieved from the receive queue.
The message status set to DLNG.
Delivering to channel: CC_SOAP_Rcvr_D_Pick_ZALEAUD
SOAP: request message entering the adapter
SOAP: completed the processing
SOAP: response message received 4cb3fab0-7fc5-11db-8c5a-000f203c93e0
SOAP: response message contains an error Application/UNKNOWN/APPLICATION_ERROR - application fault
SOAP: sending a delivery error ack ...
SOAP: sent a delivery error ack
Exception caught by adapter framework: SOAP: response message contains an error Application/UNKNOWN/APPLICATION_ERROR - application fault
Delivery of the message to the application using connection AFW failed, due to: SOAP: response message contains an error Application/UNKNOWN/APPLICATION_ERROR - application fault.
The asynchronous message was successfully scheduled to be delivered at Wed Nov 29 16:23:51 GMT 2006.
The message status set to WAIT.
Retrying to deliver message to the application. Retry: 1
Kind Regards
Ramesh
Message was edited by:
Ramesh Reddy Pothireddy -
Error when calling a Webservice's public method in Forms10g
Hi,
I'm getting the following error when calling a webservice's public method, i'm using Forms10g 10.1.2.3
java.rmi.RemoteException; nested exception is: HTTP transport error javax.xml.soap.SOAPException
java.security.PrivilegedActionException javax.xml.soap.SOAPException
Message send failed javax.net.ssl.SSLException SSL handshake failed X509CertChI have added the Jar containing the client proxy in both Classpaths(system variable and default.env), the jar has been made with jdk 1.4
I also have tested the client proxy from jDeveloper and it's working there, but in Forms i'm getting this error.
I guess my problem might be that i'm calling a webservice that is secured since the url starts with https
what should i do to fix this ??
Regards
CarlosI understand, so i have a doubt, why the webservice works on jDeveloper ??Not just JDeveloper even soapUI and Neatbeans have a way of working without a client certificate installed.
I do not know how they achieve it. I know that they work without a client DC.
Cheers,
PS: See this http://stackoverflow.com/questions/8887434/webservices-ssl-https, it offers a clue.
The java programs run unhindered when one-way authentication is being used. These products ship with a digital certificate that is in the path of most popular CAs.
Corollary, if the Web Server is configured for mutual authentication then you need to install and configure the client certificate in the tools.
Edited by: Prabodh on Dec 5, 2012 8:36 PM -
Calling a webservices from Oracle 10G ( 10.2.0.2)
Hi:
I am in the process of putting a database Java stored procedure that can call an external webservices.
PL/SQL Wrapper -> Java Stored Procedure-> External Web services
I loaded the following jars in the dataase.
dbwsa.jar
dbwsclient.jar
1. I am having issues consuming this external webservice from SQL*PLUS. Do you know whether I need to load any other JARS ?
2. How can I debug this issue ? I enabled TCP Monitor in JDeveloper and don't see anything when I call the PL/SQL wrapper in SQL*PLUS.
3. I can use a Java client and tested the Web services OK.
error message:
SQL> l
1 declare
2 x varchar2(100);
3 begin
4
5 x := tester.test_db1();
6* end;
SQL> /
calling
http://XX.XX.YY.121:8988/Application9-ViewController-context-root/MyWebService1S
oapHttpPort
java.rmi.RemoteException: Error parsing envelope; nested exception is:
javax.xml.soap.SOAPException: Error parsing envelope
at
view.proxy.runtime.MyWebService1SoapHttp_Stub.sayhello2(MyWebService1SoapHttp_St
ub.java:99)
at
prpd.MyWebService1SoapHttpPortClient.sayhello2(MyWebService1SoapHttpPortClient.j
ava:41)
at prpd.TEST_DB.TEST_DB1(TEST_DB.java:21)
Caused by: javax.xml.soap.SOAPException: Error parsing envelope
at
oracle.j2ee.ws.saaj.soap.soap11.SOAPImplementation11.createEnvelope(SOAPImplemen
tation11.java:103)
at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:75)
at oracle.j2ee.ws.saaj.soap.MessageImpl.getSOAPBody(MessageImpl.java:934)
at
oracle.j2ee.ws.client.StreamingSender._preHandlingHook(StreamingSender.java:692)
at oracle.j2ee.ws.client.StubBase._preHandlingHook(StubBase.java:688)
at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:207)
at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:112)
at
view.proxy.runtime.MyWebService1SoapHttp_Stub.sayhello2(MyWebService1SoapHttp_St
ub.java:76)
... 2 more
Caused by: java.lang.IllegalArgumentException
at oracle.xml.parser.v2.XMLParser.setAttribute(XMLParser.java:794)
at
oracle.j2ee.ws.saaj.soap.soap11.SOAPImplementation11.createEnvelope(SOAPImplemen
tation11.java:54)
... 9 more
PL/SQL procedure successfully completed.
SQL> /
thx
Rajthanks Tugduall for the comments. here are the instructions I followed to create a java stored procedure that can call a webservices. Unfortunately, this seems like a very complex task. Do you have any ideas how I could debug or troubleshoot this issue ?
Please note that I used JDeveloper to generate the client code.
========================================================
1. download the dbws-callout-utility-10R2.zip from OTN at:
http://www.oracle.com/technology/sample_code/tech/java/jsp/dbwebservices.html
2. create an application/project with 1.4 JDK.
3. create a web service by ‘Business Tier’->Web Service->Web Service Proxy->UDDI
4. next… to ‘Search for’, type ‘quote’.
5. from the list select one. For me ‘Quote of day’ was picked.
6. click Next all the way to Finish.
7. from the ‘Application Sources’ select ‘QuotoProxy’ then find its main method.
8. at the section
// Add your own code here, add the line like:
System.out.println("quote "+myPort.getQuote());
9. run it to see its return.
10. cteate a class that has a method to call client method to be invoked (static)
like the following:
package dbws;
import dbws.QotdPortClient;
public class MainClientStub {
public MainClientStub() {
public static String getMyQoute(){
QotdPortClient myClient = null;
try {
myClient = new QotdPortClient();
return myClient.getQuote();
} catch (Exception e) {
e.printStackTrace();
return null;
note that the package name in your project.
11. create a deployment profile as ‘JAR File’. Uncheck the box ‘Project Dependencies’
12. deploy it to the local box. ‘Deploy to JAR File’.
13. unzip the dbws-callout-utility-10R2.zip to get dbwsa.jar.
14. execute the following from command line:
loadjava –user test/[email protected] -resolve –verbose –synonym –grant public to dbwsa.jar myarchive1.jar
loadjava -user test/test@orcl1020 -resolve -verbose -synonym -genmissing -grant public myarchive1.j
ar dbwsa.jar
loadjava -user sys/<sys_pass> -resolve -verbose -synonym -genmissing -grant public myarchive1.jar dbwsa.jar
15. create a function like the following:
CREATE OR REPLACE FUNCTION teststub RETURN VARCHAR2 AS
LANGUAGE JAVA NAME ‘dbws.MainClientStub.getMyQoute() return java.lang.String’;
16. Run at sqlplus: Select teststub from dual;
======================================================
Maybe you are looking for
-
Don't know which technology to utilize or how to configure ASA5505
I have an ASA5505. Currently, it is using static NAT on several ports to forward traffic to several devices inside my network. It is a pain not only to configure but from the end user side. The issue I am having is the applicatoins I am using to ac
-
Dear all, while doing goods receipt, i m getting following error..m not able to figure out the document type for kw..or is it something else? please reply imm and get full points... error- For object ZCOMP KW, number range interval 01 does not exist
-
I keep getting this error message when syncing my iPhone. Why?
When I seek to sync my iPhone, I get this message: "iTunes cannot sync information with the iPhone "Russell Swaim's iPhone" because syncing has been disabled on this computer. Do you want to enable syncing?" I hit "yes" togive permission to sync, but
-
No picture, just sound ?
I can only hear the Apple TV's menu ... I dont get any picture. Any ideas? I know its in the right port. I connected component and HDMI and both do the same. Anyway to reset the Apple TV with the remote? or is there a button on it somewhere?
-
Excise & sales tax legal requirements
Dear Experts, After creating Excise Invoice, what are the activities SD consultant has to carry out regarding excise registers and sales tax registers and what are the legal requirements to be filled up from SD point of view. Kindly guide me on the s