cancel
Showing results for 
Search instead for 
Did you mean: 

Web Service Array Serialization/DeSerialization in EP 6.0 SP4 !!

Former Member
0 Kudos

Environment :

Portal : 6.0.4.0.0.Enterprise_Portal_Support_Package_4

JDK : 1.3.1

NW Studio : 2.0.4

I have published a portal service as a web service through the NW studio and created a standalone client. I have written a test client which uses the client jar file generated from NW studio stanalone proxy wizard. I also did a HTTP trace and looked at the request being sent to the portal. I am getting the following exception on the server side ...

javax.xml.soap.SOAPException: Unable to serialize SOAPPart from source

at com.sap.engine.services.webservices.jaxm.soap.SOAPPartImpl.setContent(SOAPPartImpl.java:186)

at com.sap.engine.services.webservices.jaxm.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:80)

at com.sap.engine.services.webservices.jaxm.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:36)

at com.sapportals.portal.prt.service.soap.SOAPConnection.processSOAPPost(SOAPConnection.java:237)

at com.sapportals.portal.prt.service.soap.SOAPConnection.handleRequest(SOAPConnection.java:185)

at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:532)

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

at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:415)

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

at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:153)

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

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

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

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

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

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:699)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:224)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)

at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)

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

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:140)

Caused by: com.sap.engine.lib.xml.parser.NestedSAXParserException: com.sap.engine.lib.xml.parser.ParserException: The empty string is not acceptable for a value of an xmlns:* attribute.(:main:, row:1, col:3321)(:main:, row=1, col=3321) -> com.sap.engine.lib.xml.parser.ParserException: The empty string is not acceptable for a value of an xmlns:* attribute.(:main:, row:1, col:3321)

at com.sap.engine.lib.xml.parser.DOMParser.parse(DOMParser.java:136)

at com.sap.engine.lib.xml.parser.DOMParser.parse(DOMParser.java:150)

at com.sap.engine.services.webservices.jaxm.soap.SOAPPartImpl.parseDocument(SOAPPartImpl.java:49)

at com.sap.engine.services.webservices.jaxm.soap.SOAPPartImpl.setContent(SOAPPartImpl.java:174)

For some reason, the client is sending blank as the xml name space for array attributes in the objects when serializing. Also, I have used the wsdl as it is and have not modified it.

The client is sending the following for array attributes in the soap request [:main:, row:1, col:3321 ] ...

xmlns:tns='' xmlns:ns2='http://schemas.xmlsoap.org/soap/encoding/'

Are there any issues if complex object includes array of complex objects ??

I appreciate your help !!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello,

1. The array in Complex Types are supported by the portal webservices, but i recommend to use EP6 SP9 because many bugs are fixed. Normally in your case your version works with array

2. You can enable the portal soap logger in your portal (system Administration->support->portalruntime->soap admin in configuration enable soap debbug mode and soap logger, after all soap messages received by the portal webservice framework are logger in default.trc and after you can select the soap message and use XML tool to valid the message.

3. You can use in your SAP netweaver studio, the webservice checker in EP perspective (open view Portal Webservice checker), you put the url of WSDL file and after you can call all methods included in wsdl, to check the validity of your webservice.

Best Regards,

Fabrice

bjorn-henrik_zink
Active Participant
0 Kudos

Hi,

the parser doesn't like that there is an empty string:

com.sap.engine.lib.xml.parser.ParserException: The empty string is not acceptable for a value of an xmlns:* ...

are you sure that the attribute is filled?

Otherwise, I know that there are some Java Web Services technology known issues. For instance, you can find some technical limitations at the following site:

http://java.sun.com/webservices/docs/1.5/jaxrpc/ReleaseNotes.html

Are you using Static Stubs, Dynamic Proxy or DII?

Former Member
0 Kudos

Hi

Elvez,

Thanks for answering.I have created the web service client jar file through the NW studio standalone proxy wizrd which creates a jar file so that external java application can invoke the web service outside of the portal. The web service is called dynamically by the following code ...

TestService service = new TestServiceImpl();

TestBindingStub port = (TestBindingStub)service.getTestService();

Pip3A2PriceAndAvailabilityRequest request = new Pip3A2PriceAndAvailabilityRequest();

populateRequest( request );

Pip3A2PriceAndAvailabilityResponse response = port.getInventory( request );

If I have issued Netweaver Studio to both publish the service as well as to consume the web service, I think then the issue is on the client side wizard which creates the proxy classes for the web service client in the jar file. The wsdl specifies the xml namespace for the Arrays but the generated client code probably is not setting the name space correctly.

Thanks

Bhabesh Patel