Skip to Content
0
Former Member
Sep 11, 2007 at 06:26 PM

How can I translateSAP variables into Java variables when call webservice

18 Views

Hi all,

I have built a web service from Function module.

I can execute my services from SE37 and It's ok, the problem arises when I call my web service from an-other external custom application like EP .

I followed the steps given in the link

How to Consume a WebService in JSP DynPage

I have two problems:

1. How can I convert the SAP char variables (e.g. char12) to Java values?

in the XML file you can see:

com:document:sap:rfc:functions" elementFormDefault="unqualified" attributeFormDe-fault="qualified">

<b>- <xsd:simpleType name="char12"></b>

- <xsd:restriction base="xsd:string">

<xsd:maxLength value="12" />

</xsd:restriction>

</xsd:simpleType>

<b>- <xsd:simpleType name="char120"></b>- <xsd:restriction base="xsd:string">

<xsd:maxLength value="120" />

</xsd:restriction>

</xsd:simpleType>

- <xsd:simpleType name="char25">

- <xsd:restriction base="xsd:string">

<xsd:maxLength value="25" />

</xsd:restriction>

</xsd:simpleType>

- <xsd:simpleType name="date">

- <xsd:restriction base="xsd:string">

<xsd:maxLength value="10" />

<xsd:pattern value="dddd-dd-dd" />

</xsd:restriction>

</xsd:simpleType>

- <xsd:simpleType name="numeric1">

- <xsd:restriction base="xsd:string">

<xsd:maxLength value="1" />

<xsd:pattern value="d*" />

</xsd:restriction>

</xsd:simpleType>

- <xsd:simpleType name="time">

- <xsd:restriction base="xsd:string">

<xsd:maxLength value="8" />

<xsd:pattern value="dd:dd:dd" />

</xsd:restriction>

</xsd:simpleType>

- <xsd:element name="Z_APPOINTMENT_GET_ST_ORG">

Â…..

Â….

Â….

Â….

2. When calling functions from webservices I get the results as a SAP table; how can I con-vert this into a Java table instead?

Thanks in Advance,

Raghu Reza.