Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

RFC -> XI -> WebService - Walkthrough ----Importing WSDL, problem

Hi

I am following this weblog

/people/shabarish.vijayakumar/blog/2006/03/23/rfc--xi--webservice--a-complete-walkthrough-part-1

I have createed RFC as mentioned in this blog

<b>BLOG-----RFC</b>

-


Import :

FROMZIP type CHAR10

TOZIP type CHAR10

Export:

DISTANCE type CHAR10

source code:

FUNCTION Z_WEBSERVICE_TEST_SHABZ.

*"----


""Local interface:

*" IMPORTING

*" VALUE(FROMZIP) TYPE CHAR10

*" VALUE(TOZIP) TYPE CHAR10

*" EXPORTING

*" VALUE(DISTANCE) TYPE CHAR10

*"----


ENDFUNCTION.

-


<b>My RFC</b>

-


Import :

FROMZIP type CHAR10

TOZIP type CHAR10

Export:

DISTANCE type CHAR10

source code:

FUNCTION Zdushanth_webservice.

*"----


""Local interface:

*" IMPORTING

*" <b>REFERENCE</b>(FROMZIP) TYPE CHAR10

*" <b>REFERENCE</b>(TOZIP) TYPE CHAR10

*" EXPORTING

*" <b>REFERENCE</b>(DISTANCE) TYPE CHAR10

*"----


ENDFUNCTION.

when I activate I am getting as Reference parameters are not allowed with RFC ?

I have created by referring this blog but in the source code (Importing and exporting) I am getting REFERENCE ?

why I am getting this ?

Thanks

dushanth

Message was edited by:

dushanth ry

Message was edited by:

dushanth ry

Former Member
Former Member replied

Here we goo....

<?xml version="1.0" encoding="UTF-8"?>

<wsdl:definitions targetNamespace="http://webservices.imacination.com/distance/Distance.jws" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:intf="http://webservices.imacination.com/distance/Distance.jws" xmlns:impl="http://webservices.imacination.com/distance/Distance.jws">

<wsdl:message name="getLongitudeResponse">

<wsdl:part name="getLongitudeReturn" type="xsd:double"/>

</wsdl:message>

<wsdl:message name="getLongitudeRequest">

<wsdl:part name="zip" type="xsd:string"/>

</wsdl:message>

<wsdl:message name="getLatitudeRequest">

<wsdl:part name="zip" type="xsd:string"/>

</wsdl:message>

<wsdl:message name="getLatitudeResponse">

<wsdl:part name="getLatitudeReturn" type="xsd:double"/>

</wsdl:message>

<wsdl:message name="getCityResponse">

<wsdl:part name="getCityReturn" type="xsd:string"/>

</wsdl:message>

<wsdl:message name="getCityRequest">

<wsdl:part name="zip" type="xsd:string"/>

</wsdl:message>

<wsdl:message name="getLocationResponse">

<wsdl:part name="getLocationReturn" type="xsd:string"/>

</wsdl:message>

<wsdl:message name="getStateResponse">

<wsdl:part name="getStateReturn" type="xsd:string"/>

</wsdl:message>

<wsdl:message name="getStateRequest">

<wsdl:part name="zip" type="xsd:string"/>

</wsdl:message>

<wsdl:message name="getLocationRequest">

<wsdl:part name="zip" type="xsd:string"/>

</wsdl:message>

<wsdl:message name="getDistanceResponse">

<wsdl:part name="getDistanceReturn" type="xsd:double"/>

</wsdl:message>

<wsdl:message name="getDistanceRequest">

<wsdl:part name="fromZip" type="xsd:string"/>

<wsdl:part name="toZip" type="xsd:string"/>

</wsdl:message>

<wsdl:portType name="Distance">

<wsdl:operation name="getState" parameterOrder="zip">

<wsdl:input name="getStateRequest" message="impl:getStateRequest"/>

<wsdl:output name="getStateResponse" message="impl:getStateResponse"/>

</wsdl:operation>

<wsdl:operation name="getLocation" parameterOrder="zip">

<wsdl:input name="getLocationRequest" message="impl:getLocationRequest"/>

<wsdl:output name="getLocationResponse" message="impl:getLocationResponse"/>

</wsdl:operation>

<wsdl:operation name="getCity" parameterOrder="zip">

<wsdl:input name="getCityRequest" message="impl:getCityRequest"/>

<wsdl:output name="getCityResponse" message="impl:getCityResponse"/>

</wsdl:operation>

<wsdl:operation name="getDistance" parameterOrder="fromZip toZip">

<wsdl:input name="getDistanceRequest" message="impl:getDistanceRequest"/>

<wsdl:output name="getDistanceResponse" message="impl:getDistanceResponse"/>

</wsdl:operation>

<wsdl:operation name="getLatitude" parameterOrder="zip">

<wsdl:input name="getLatitudeRequest" message="impl:getLatitudeRequest"/>

<wsdl:output name="getLatitudeResponse" message="impl:getLatitudeResponse"/>

</wsdl:operation>

<wsdl:operation name="getLongitude" parameterOrder="zip">

<wsdl:input name="getLongitudeRequest" message="impl:getLongitudeRequest"/>

<wsdl:output name="getLongitudeResponse" message="impl:getLongitudeResponse"/>

</wsdl:operation>

</wsdl:portType>

<wsdl:binding name="DistanceSoapBinding" type="impl:Distance">

<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>

<wsdl:operation name="getState">

<wsdlsoap:operation soapAction=""/>

<wsdl:input name="getStateRequest">

<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://DefaultNamespace"/>

</wsdl:input>

<wsdl:output name="getStateResponse">

<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservices.imacination.com/distance/Distance.jws"/>

</wsdl:output>

</wsdl:operation>

<wsdl:operation name="getLocation">

<wsdlsoap:operation soapAction=""/>

<wsdl:input name="getLocationRequest">

<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://DefaultNamespace"/>

</wsdl:input>

<wsdl:output name="getLocationResponse">

<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservices.imacination.com/distance/Distance.jws"/>

</wsdl:output>

</wsdl:operation>

<wsdl:operation name="getCity">

<wsdlsoap:operation soapAction=""/>

<wsdl:input name="getCityRequest">

<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://DefaultNamespace"/>

</wsdl:input>

<wsdl:output name="getCityResponse">

<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservices.imacination.com/distance/Distance.jws"/>

</wsdl:output>

</wsdl:operation>

<wsdl:operation name="getDistance">

<wsdlsoap:operation soapAction=""/>

<wsdl:input name="getDistanceRequest">

<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://DefaultNamespace"/>

</wsdl:input>

<wsdl:output name="getDistanceResponse">

<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservices.imacination.com/distance/Distance.jws"/>

</wsdl:output>

</wsdl:operation>

<wsdl:operation name="getLatitude">

<wsdlsoap:operation soapAction=""/>

<wsdl:input name="getLatitudeRequest">

<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://DefaultNamespace"/>

</wsdl:input>

<wsdl:output name="getLatitudeResponse">

<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservices.imacination.com/distance/Distance.jws"/>

</wsdl:output>

</wsdl:operation>

<wsdl:operation name="getLongitude">

<wsdlsoap:operation soapAction=""/>

<wsdl:input name="getLongitudeRequest">

<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://DefaultNamespace"/>

</wsdl:input>

<wsdl:output name="getLongitudeResponse">

<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservices.imacination.com/distance/Distance.jws"/>

</wsdl:output>

</wsdl:operation>

</wsdl:binding>

<wsdl:service name="DistanceService">

<wsdl:port name="Distance" binding="impl:DistanceSoapBinding">

<wsdlsoap:address location="http://webservices.imacination.com/distance/Distance.jws"/>

</wsdl:port>

</wsdl:service>

</wsdl:definitions>

I have tested this and its working fine...:)

Nilesh

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question