Web Service Call to consume SAP Web Service

Ask a Question related to Coldfusion Component Development, Design and Development.

  1. #1

    Default Web Service Call to consume SAP Web Service

    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:
    [url]http://xxxx.xxxxxxx.com:8002/sap/bc/srt/rfc/sap/Z_ZRFC_TEST?sap-client=235&wsdl=1.1[/url]

    Please advice what to check...

    Regards,
    Egils
    Egils Guest

  2. Similar Questions and Discussions

    1. Consume 3rd party web service
      Hi: The web service provider required a client certificate for authentication. What this client certificate is ? Is it a certificate use for...
    2. Consume web service(s)
      Folks: I was successfully able to consume the first web service(WS). Created another WS and added a reference on the client project, it added...
    3. Consume NOAA Web Service
      I'm using the code below to attempt to consume the NOAA weather service and am getting the following error: Web service operation "NDFDgen" with...
    4. How to consume a Java Web Service from VB 6
      Hi, I am trying to consume a web service (Apache) using wsdl file from vb 6. I have tried Low-Level and High Level calls But I could not...
    5. Consume a Web Service from Classic ASP
      Hi, How can I consume a Web Service that returns a DATASET from classic ASP. I know how to consume the Web Service when it returns just a variable...
  3. #2

    Default Re: Web Service Call to consume SAP Web Service

    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.
    Egils Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139