cancel
Showing results for 
Search instead for 
Did you mean: 

XmlUnmarshalException while calling ABAP WS from a WebDynpro DC

Former Member
0 Kudos

All,

I have 2 DCs one for UI and one for my WebService Data Model.I am using my ModelData DC in my UI DC.I have 2 Import Parameters(Mandatory) and rest all Table parameters are OPTIONAL in my RFC.I created a ABAP WebService for this RFC and even verified the XML Schema and the Mandatory/Optional settings of my XML matches with the RFC.When i execute the WebService from WSADMIN from SAP everything works fine and the only parameters that are mandatory are the Import Parameters.It executes fine without passing any data to the Tables parameters.

The issue is when i execute this WS from my WebDynpro application it is asking me to fill values for my RETURN tables parameters.(eventhough it is set as optional in RFC and also in XML).I am getting the following error.

"Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.XmlUnmarshalException: XML Deserialization Error. XML is not valid. Element []<T_MSG_TXT> is required in <soap-env:Body> but can not be found.".

Now my question is "Do i have to set a EMPTY RECORD in my RETURN table even though it is OPTIONAL? OR i am missing or doing something wrong?"

Then i looked at SAP Note 956443 which talks about similar issue but it is for WAS 7.0 > SP04 or so.But i am in WAS6.40 SP16.I am thinking of a better way to handle this.

Any kind of help is greatly appreciated.

Thank You

Gisk

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Original Issue with ABAP WS not resolved but taken care with Adaptive RFC Model.

Former Member
0 Kudos

Hi Gisk,

Can you provide the XML schema for your web service?

It happens with the ABAP web service with table parameters.

It must be showing Table parameter as mandatory in XML file.

Regards,

Bhavik

Former Member
0 Kudos

Hi Bhavik,

I have copied only the XML schema related to the BAPIRETURN.Let me know if you need any additional informations.Thanks for your help.

.......................................................................................................................

WSDL Types

.......................................................................................................................

<xsd:complexType name="BAPIRET2">

- <xsd:sequence>

<xsd:element name="TYPE" type="tns:char1" />

<xsd:element name="ID" type="tns:char20" />

<xsd:element name="NUMBER" type="tns:numeric3" />

<xsd:element name="MESSAGE" type="tns:char220" />

<xsd:element name="LOG_NO" type="tns:char20" />

<xsd:element name="LOG_MSG_NO" type="tns:numeric6" />

<xsd:element name="MESSAGE_V1" type="tns:char50" />

<xsd:element name="MESSAGE_V2" type="tns:char50" />

<xsd:element name="MESSAGE_V3" type="tns:char50" />

<xsd:element name="MESSAGE_V4" type="tns:char50" />

<xsd:element name="PARAMETER" type="tns:char32" />

<xsd:element name="ROW" type="xsd:int" />

<xsd:element name="FIELD" type="tns:char30" />

<xsd:element name="SYSTEM" type="tns:char10" />

</xsd:sequence>

</xsd:complexType>

...........................................................

<xsd:complexType name="TableOfBAPIRET2">

- <xsd:sequence>

<xsd:element name="item" minOccurs="0" maxOccurs="unbounded" type="tns:BAPIRET2" />

</xsd:sequence>

</xsd:complexType>

.......................................................................................................................

Request

.......................................................................................................................

<xsd:element name="T_MSG_TXT" minOccurs="0" type="tns:TableOfBAPIRET2" />

.......................................................................................................................

Response

.......................................................................................................................

<xsd:element name="T_MSG_TXT" type="tns:TableOfBAPIRET2" />

-Gisk

Former Member
0 Kudos

All,

I tried to deploy the 2 SDAs/SCAs WebServices and WebServices_lib per the recommendation of the SAP Note and it does not help.I have a local instance of J2EE and i am deploying and running my WD Application on an Central Instance by Checking-In my Activity.I think i have to have this SDAs/SCAs deployed on my central instance of the SDM and not the local one.

Any Ideas??.I am still not able to locate the problem.

Any kind of help on this is greatly appreciated.

Thank You

Gisk

Former Member
0 Kudos

Hi,

If you are using such SDAs/SCAs in you project then you haveto deploy these on central server also. Otherwise,at runtime it will give you error somthing like, classnotFoundException.

Regarding, mandatory for table parameter, I have checked from my side, it din't give me any errors. check out in R/3 whether this table parameter is optional or mandatory parameter.

Regards,

Bhavik

Former Member
0 Kudos

Thank You.

The Table Parameter is OPTIONAL. Finally we went back to Adaptive RFC Model instead of ABAP Web Service.

-Gisk