on 03-13-2012 1:49 PM
In a Netweaver 7.30 java server proxy (Receiver/Provider/Inbound), how can we access attachments and read Dynamic Configuration?
I've read in this document ( http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/508bb504-87cf-2c10-2aaf-f3a5df75e...) that the MessageSpecifier() is for XI3.0 and PI 7.0 and that for 7.1+ systems, the ProvideXIMessageContext should be used. However in ProvideXIMessageContext I can find no methods for accessing the attachments.
Furthermore, I couldnt find any methods for accessing the dynamic configuration, can this be done from within a server proxy?
Can anyone provide some clarity on this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Alexander
Thanks for the response.
Can you tell me where to get the com.sap.engine.services.webservices.espbase.server.api package?
I generated a java bean skeleton using a service interface from the ESR and can only see the com.sap.engine.services.webservices.espbase.server.additions package with ProviderXIMessageContext.
Regards
Adam
Hi Adam,
Unfortunately, I found that class is not packaged in the publicly available DCs and thus it is not visible by default to you. I've created an internal ticket on that.
On the server-side it is available in bin\ext\webservices_lib\lib\private. Maybe you can reference it directly from there till the colleagues fix that. If you use NWDI, you would have to create a DC of type External Library and package the JAR file just for the build. You don't need to provide any deploy or runtime reference.
In addition, you might have to reference tc/je/webservices/lib DC in order to access the Attachment classes.
Regards, Alexander
Hi Alexander ( or Anyone how knows)
Im still trying to successfully call my service via XI.3 protocol and JPR. I believe I have to register my bean with the proxy server as mentioned here: http://help.sap.com/saphelp_nw73/helpdata/en/d1/ce48d83cb945b9bd76dc11446fce72/frameset.htm
.The help says:
Use the following command to register the service interface myInterface with the namespace http://com.sap.aii and assign it to the server bean with the JNDI namesap.com/MyProject/MyInboundProxy_PortTypeBean and to the method myMethod to be called
I have deployed my .ear and related .ejb but can't find it in the JNDI browser in NWA.
Do you know If I need to do something extra to create a JNDI name or should I be looking somewhere else?
Any advice is welcome.
Regards
Adam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alexander ( or Anyone )
In my last reply I was asking about registering the bean with the JPR...
Through trial and error it appears that this step is not neccessary. ( the step of registering the implementation bean with JPR that is, as mentioned in http://help.sap.com/saphelp_nw73/helpdata/en/d1/ce48d83cb945b9bd76dc11446fce72/frameset.htm)
I say this because I now have an XIEnabled() webservice running on the JAVA AS of my PO.731 system. There are no interfaces registered (http://<host>:<port>/ProxyServer/listAll ), yet I can see in the developer traces that my system.out messages are being written- so , the bean is being reached.
Do I, or Do I not need to register the implementation bean with the JPR ? And If I do, then where can I find the JNDI name? ( cause I cant find it in the NWA JNDI browser )
Regards
Adam
Hi Adam,
There are two ways to generate a java proxy - via SAP NetWeaver Developer Studio and via the Integration Builder. The latter was the only one that was available in PI 7.0. However, it is no longer supported in subsequent releases and one shall use the proxy generation in SAP NetWeaver Developer Studio.
In the studio, you use the JAX-WS programming model and it is sufficient just to make the EJB an XIEnabled one. The registration was required for the proxies generated in the Integration Builder and is no longer required for the JAX-WS programming model. In addition, http://<host>:<port>/ProxyServer/listAll lists proxies generated in the Integration Builder. The JAX-WS ones can be seen in NWA -> SOA -> Application and Scenario Communication -> Single Services Administration (note it lists also standard web services deployed on the Java stack).
Sorry for the confusion. You just need to follow the steps as described in this document and don't need anything else in addition:
Regards, Alexander
Hi Experts,
We are trying to implement PI Java Proxies (consumer + provider) on a CE 7.3 system (which is mostly used for BPM).
In order of time:
We get the error when sending XI3.0-compatible message from a PI Integration Server: "XI Protocol is not available".
I also explored the Functional Units on the CE system. It showed AE as disabled, so I tried to enable it. However, it skips all steps...
Thanks, Wout
Description |
No specified detailed description
State |
Step is skipped based on 'execution condition', reason:
Sub steps |
Alexander,
7.31 installation is underway, but will take some months . So we have to do with CE 7.30 now. Because of reliability requirements and target architecture (PO 7.31 which will replace CE 7.3) it seems wise to start developing Java Proxies, both consumer and provider. Documentation states that JPR can be installed on any Java AS (incl CE I presume). So, can you give pointers how to fix the current state (SAPXIAF on CE 7.3)? Thanks in advance.
Gr, Wout
HI Again Alexdander,
I hope you can still help me out a bit. Regarding soap faults:
I've generated a JAX-WS based synchronous webservice ( Reciever/Provider/Inbound proxy), which is Xi30 enabled.
The generation wizard created classes for the fault message types which were defined in the service interface, and I would like to return a soap fault to the consumer in a particular situation. So, based on a certain condition I throw the soap fault as follows:
///////////////CODE SAMPLE///////////////////////////////
if (businessParterIdentification.equalsIgnoreCase("100")){
//throw Technical Error
TechnicalErrorType techerror = new TechnicalErrorType();
throw new nl.companyxyz.mo.ce.policy.a.pi.proposition._2011._02.P1P2TechnicalError("technical Error", techerror);
///////////////CODE SAMPLE///////////////////////////////
Im testing with SOAP UI, calling a normal SOAP adapter, which is routed to a XI 3 SOAP adapter via an integrated configuration. The normal response is received without problem. When the condition for the soap fault is true, then I get the following as response in SOAP ui:
<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: com.sap.aii.af.sdk.xi.srt.BubbleException: System Error Received. HTTP Status Code = 200: However System Error received in payload ErrorCode = APPLICATION_FAULT ErrorCategory = Application Parameter1 = null Parameter2 = null Parameter3 = null Parameter4 = null Additional text = null ErrorStack = null [http://sap.com/xi/XI/Message/30^Error "APPLICATION_FAULT"]
at com.sap.aii.adapter.soap.web.SOAPHandler.processSOAPtoXMB(SOAPHandler.java:663)
at com.sap.aii.adapter.soap.web.MessageServlet.doPost(MessageServlet.java:470)
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.runtime.FilterChainImpl.runServlet
Any idea what Im missing, or how I can return a proper SOAP fault?
Many Thanks
Adam
Hi Alexander,
Many Thanks for your reply, it is much appreciated.
You wrote:
I believe the outbound interface has a different fault declaration than the one in the the inbound one (e.g. a different namespace). Therefore, if you want to return the proper fault message, you have to implement a fault mapping.
There are two sides to my error handeling story:
1) Returning SOAP fault to consumer from my web service (Reveiver/provider/sever/inbound proxy) and
2) catching a soap fault returned when calling a client proxy ( and then returning a soap fault to consumer based on that fault)
At this moment im still busy with number 1 - simply returning a SOAP fault to a consumer.
In my code I check a field in the incoming message and if it has a particular value I want to return a SOAP fault. Im trying to do that with the following statement:
throw new nl.achmea.mo.ce.policy.a.pi.proposition._2011._02.P1P2ErrorList("ErrorList",errorList);
(FYI ErrorList is a SOAP fault which is modelled in the inbound interface from which I generated the web service)
When that line of code is reached the following appears in the developer trace:
]. Implementation exception occurs for application achmea.nl/rel~getbusinesspartnerdetails_ear. Check implementation container(e.g. EJB) logs for additional information
And:
Error processing inbound message. FaultException: com.sap.aii.proxy.xiruntime.core.esp.ESI2XIFault_Message_Exception: <ns:ESI2XIFault xmlns:ns="http://sap.com/aii/proxy/xiruntime/core/esp"><addition><SOAP-ENV:Fault xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><faultcode>SOAP-ENV:Server</faultcode>... xmlns:ns3='http://www.achmea.nl/BuildingBlocks/ExceptionHandling/2010/01' xmlns:ns2='http://www.achmea.nl/Policy/Proposition/Operations/2011/02'></ns3:ErrorList></detai...;</addition></ns:ESI2XIFault><ns:ESI2XIFault xmlns:ns="http://sap.com/aii/proxy/xiruntime/core/esp"><addition><SOAP-ENV:Fault xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><faultcode>SOAP-ENV:Server</faultcode>... xmlns:ns3='http://www.achmea.nl/BuildingBlocks/ExceptionHandling/2010/01' xmlns:ns2='http://www.achmea.nl/Policy/Proposition/Operations/2011/02'></ns3:ErrorList></detai...;</addition></ns:ESI2XIFault>
Im testing this by calling a SOAP_to_SOAPXi3 integrated configuration. Both Interfaces are the same with the only difference than one is outbound and one is inbound. The fault messages in both are same and have the same namespace. To be sure I did add an operation mapping with mappings for the fault messages but I get the same result.
Do you have any other ideas, or perhaps an example when you return a soap fault to a consumer?
FYI -
I changed my server proxy to be a 'normal' webservice.( not XIEnabled() ) and updated the relevant receiver channel to use SOAP1.1 instead of XI3 and voila - my soap fault now gets returned as expected.
So.. there was nothing wrong with my code. However there appears to be a deeper issue with AEX and Xi3.
I believe this note describes the issue ( not getting soap faults back when using Xi3) , altough there is no patch yet for 7.31
https://websmp130.sap-ag.de/sap(bD1ubCZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1556428
Hi Alexander,
the document you mentioned ("Java Proxy Migration Guide") indicates at the end some restrictions when using the JAX-WS programming model, e.g. not being able to manipulate attachments. The document is a bit old, do these restrictions still apply for PI 7.31 ?
Haven´t found anything the the release notes, would appreciate if you could clarify this 🙂
Best regards,
Matthias
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.