cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP Client for Synchronous Scenario

Former Member
0 Kudos

Hello there,

I am trying to config a Synchronous Scenario that using SOAP at client to send data to R3 and then get the return document number.

I got it work for Asynchronous from Client to R3. Here was how I did:

- Get a "wsdl" file using Define Web Service.

- Using wsdl2java tool to generate java file.

- Compile java files.

- Create java client that will retrieve the service and call method to submit data to R3 server (through XI).

However, I got null point exception when I tried to print return data for Synchronous case.

In fact, I tried another scenario that sending File to XI to Soap. In this case, I created a java Servlet file extends of HttpServlet.

So I had a few questions for setting up the SOAP client:

a. Under "Sender Communication Channel", what is the values I am supposed to input for "Interface Namespace", and "Interface Name" under "Default XI Parameters"?

b. When I use the option "Define Web Service", what is value I have to input for "Service", "Interface Namespace", and "Interface Name"?

c. To get the response value, do I have to use "doPost" to send the Soap message? In this case, I will get data through "doGet"?

I really appreciate your help.

cm.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello there,

I followed the Blog example that uses XMLSpy to send the request. However, it still didn't return me the value from R3.

I checked on my WorkBench, XI that it's in the WAITING mode for a while before submitting to R3. Then, it submits to R3 and the mode is changed to SUCCESSFUL.

I believe it leads to "Return Nothing" because the client can not wait for the return value. Is this right?

Again, thank you so much for your help.

cm.

stefan_grube
Active Contributor
0 Kudos

Hi cm,

In the sender SOAP adapter channel set the processing mode parameter <i>Quality of Service</i> to <i>Best Effort</i>.

If you have not Best Effort, the call is treated as async, then no reply is received.

Regards

Stefan

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi I'm getting this error when I try to make a synchronous call to PI. I went to display web services and entered the Interface name and namespace on both pages. I used the sender interface name and namespace as well as the sender communication component. I saved the wsdl created and now when I consume the wsdl using SOap UI client and run it I get this error. I can't figure out what the problem is. I'm using Netweaver PI 7.1. I've created receiver determination, sender agreement, receiver agreement, interface determination. When i created an Integrated Configuration object and consumed in soap ui client it worked but does work if I want to use the Integration Server. The reason I want to use the Integration Server is because i want to do content based routing which I cannot do with Integrated Configuration since it bypasses the Integration Server.

Below is the error I get:

<!see the documentation>

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

<SOAP:Body>

<SOAP:Fault>

<faultcode>SOAP:Server</faultcode>

<faultstring>Server Error</faultstring>

<detail>

<s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">

<context>XIAdapter</context>

<code>ADAPTER.JAVA_EXCEPTION</code>

<text>com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessagingException: XIServer:UNAUTHORIZED:

at com.sap.aii.adapter.soap.ejb.XISOAPAdapterBean.process(XISOAPAdapterBean.java:996)

at sun.reflect.GeneratedMethodAccessor799_10000.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:43)

at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)

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:38)

at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22)

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:21)

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:16)

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:133)

at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164)

at $Proxy2699_10000.process(Unknown Source)

at com.sap.aii.af.app.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:275)

at sun.reflect.GeneratedMethodAccessor797_10000.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:43)

at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)

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:38)

at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22)

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:21)

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:16)

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:133)

at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164)

at $Proxy260_10000.process(Unknown Source)

at com.sap.aii.adapter.soap.web.MessageServlet.callModuleProcessor(MessageServlet.java:175)

at com.sap.aii.adapter.soap.web.MessageServlet.doPost(MessageServlet.java:470)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.runServlet(FilterChainImpl.java:163)

at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:82)

at com.sap.engine.services.servlets_jsp.server.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:124)

at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:74)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:425)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:289)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:376)

at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:85)

at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)

at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:160)

at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)

at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:67)

at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)

at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)

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:71)

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:71)

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:71)

at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:309)

at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.run(Processor.java:222)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:152)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:247)</text>

</s:SystemError>

</detail>

</SOAP:Fault>

</SOAP:Body>

</SOAP:Envelope>

Former Member
0 Kudos

Hello all,

After changing to "Best Effort", I tested it work using Altova XMLSpy.

Thank you very much for all your help.

cm.

Former Member
0 Kudos

Hi,

Pls try out the following links, for your scenario soapclient <---> XI <----> R/3

/people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi

/people/siva.maranani/blog/2005/03/01/testing-xi-exposed-web-services

Andrzej_Filusz
Contributor
0 Kudos

Hi!!!

1. Sender Communication Channel - Default XI Parameters:

Interface Namespace and Interface Name

You just have to specify here your source interface namespace and name, there is no magic here.

2. Define Web Service

When you define your WS, you have to specify interface you want to publish (in your case - the source one) and a sender interface. So in your case you have specify your source interface twice (on both pages of the wizard).

The only problem is that when you input:

- Service

- Interface Namespace

- Interface Name

for your sender interface, you can't choose this values, there are only edit fields. So I recommend you to use copy&paste method to specify these values (use notepad, for example, and copy values before starting wizard).

3. To avoid NullPointerException exception, make sure that you all your object variables are not null before you invoke any method on them.

Regards,

Andrzej