Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Web Service Call to consume SAP Web Service

36 views
Skip to first unread message

Egils

unread,
Apr 20, 2009, 12:58:44 PM4/20/09
to
Greetings,

I have been stuck trying to get CF 8 to talk to SAP serviced Web
Service. Here is code I am using:

<cfscript>
ws = CreateObject("webservice", "http://xxx.xxxxx.com:8002/sap/bc/
srt/rfc/sap/Z_ZRFC_TEST?sap-client=235&wsdl=1.1");
xlatstring = ws.ZZrfcTest(Rfcin = "Hello");
</cfscript>

Here is WSDL file

<?xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions targetNamespace="urn:sap-
com:document:sap:soap:functions:mc-style" xmlns:wsdl="http://
schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/
XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://
schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="urn:sap-
com:document:sap:soap:functions:mc-style" xmlns:n1="urn:sap-
com:document:sap:rfc:functions">
- <wsdl:documentation>
<sidl:sidl xmlns:sidl="http://www.sap.com/2007/03/sidl" />
</wsdl:documentation>
- <wsdl:types>
- <xsd:schema attributeFormDefault="qualified"
targetNamespace="urn:sap-com:document:sap:rfc:functions">
- <xsd:simpleType name="char10">
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="10" />
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
- <xsd:schema attributeFormDefault="qualified"
targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style"
xmlns:n0="urn:sap-com:document:sap:rfc:functions">
<xsd:import namespace="urn:sap-com:document:sap:rfc:functions" />
- <xsd:element name="ZZrfcTest">
- <xsd:complexType>
- <xsd:sequence>
<xsd:element name="Rfcin" type="n0:char10" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
- <xsd:element name="ZZrfcTestResponse">
- <xsd:complexType>
- <xsd:sequence>
<xsd:element name="Rfcout" type="n0:char10" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
- <wsdl:message name="ZZrfcTest">
<wsdl:part name="parameters" element="tns:ZZrfcTest" />
</wsdl:message>
- <wsdl:message name="ZZrfcTestResponse">
<wsdl:part name="parameter" element="tns:ZZrfcTestResponse" />
</wsdl:message>
- <wsdl:portType name="Z_ZRFC_TEST">
- <wsdl:operation name="ZZrfcTest">
<wsdl:input message="tns:ZZrfcTest" />
<wsdl:output message="tns:ZZrfcTestResponse" />
</wsdl:operation>
</wsdl:portType>
</wsdl:definitions>

here is error message I am getting

The web site you are accessing has experienced an unexpected error.
Please contact the website administrator.

Unable to read WSDL from URL:
http://xxxx.xxxxxxx.com:8002/sap/bc/srt/rfc/sap/Z_ZRFC_TEST?sap-client=235&wsdl=1.1

Please advice what to check...

Regards,
Egils

Egils

unread,
May 12, 2009, 9:36:26 AM5/12/09
to
After trying many things I ended up using CFHTTP. It allowed to engage
SAP Web-service. It's not 'sexy' code but it works. I created CFC that
does CFHTTP call and receives resulting XML.
0 new messages