I have been unable to connect to an SAP web service. None of
the discussions on the web seem to touch on my problem. This web
service doesn’t work like the simple web service examples
that are posted all over the web.
When I use the Dreamweaver proxy to write my code, it creates
three cfinvokearguments instead of the two I should need. And the
return variable that is created by the proxy returns a structure
that doesn’t include any methods that allow me to access any
of the data.
Can anyone look at the following code from the SAP WSDL and
explain to me how to consume the service?
Here is the code that the Dreamweaver proxy creates…
<cfinvoke
webservice="
http://sapwddev/sap/bc/srt/rfc/sap/ZSVC_EMPLOYEE_DATA?sap-client=090&wsdl=1.1"
method="ZSVC_EMPLOYEE_DATA"
returnvariable="aBAPIRETURN">
<cfinvokeargument name="NACHN"
value="enter_value_here"/>
<cfinvokeargument name="RESULTS"
value="enter_value_here"/>
<cfinvokeargument name="VORNA"
value="enter_value_here"/>
</cfinvoke>
Here is a portion of the WSDL…
- <xsd:complexType name="ZSVC_HRSTRUC">
- <xsd:sequence>
<xsd:element name="PERNR" type="tns:numeric8" />
<xsd:element name="VORNA" type="tns:char25" />
<xsd:element name="INITS" type="tns:char10" />
<xsd:element name="NACHN" type="tns:char25" />
<xsd:element name="LOCAT" type="tns:char40" />
<xsd:element name="STRAS" type="tns:char60" />
<xsd:element name="ORTO1" type="tns:char40" />
<xsd:element name="ORTO2" type="tns:char40" />
<xsd:element name="PSTLZ" type="tns:char10" />
<xsd:element name="LAND1" type="tns:char3" />
<xsd:element name="TELNR" type="tns:char14" />
<xsd:element name="COM01" type="tns:char4" />
<xsd:element name="NUM01" type="tns:char20" />
<xsd:element name="EMAIL" type="tns:char40" />
<xsd:element name="TITLE" type="tns:char40" />
<xsd:element name="ORGEH" type="tns:char40" />
</xsd:sequence>
</xsd:complexType>
- <xsd:complexType name="BAPIRETURN">
- <xsd:sequence>
<xsd:element name="TYPE" type="tns:char1" />
<xsd:element name="CODE" type="tns:char5" />
<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:sequence>
</xsd:complexType>
- <xsd:complexType name="TABLE_OF_ZSVC_HRSTRUC">
- <xsd:sequence>
<xsd:element name="item" minOccurs="0"
maxOccurs="unbounded" type="tns:ZSVC_HRSTRUC" />
</xsd:sequence>
</xsd:complexType>
- <xsd:element name="ZSVC_EMPLOYEE_DATA">
- <xsd:complexType>
- <xsd:sequence>
<xsd:element name="NACHN" minOccurs="0" type="tns:char25"
/>
<xsd:element name="RESULTS"
type="tns:TABLE_OF_ZSVC_HRSTRUC" />
<xsd:element name="VORNA" minOccurs="0" type="tns:char25"
/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
- <xsd:element name="ZSVC_EMPLOYEE_DATAResponse">
- <xsd:complexType>
- <xsd:sequence>
<xsd:element name="RESULTS"
type="tns:TABLE_OF_ZSVC_HRSTRUC" />
<xsd:element name="RETURN" type="tns:BAPIRETURN" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
- <wsdl:message name="ZSVC_EMPLOYEE_DATA">
<wsdl:part name="parameters"
element="tns:ZSVC_EMPLOYEE_DATA" />
</wsdl:message>
- <wsdl:message name="ZSVC_EMPLOYEE_DATAResponse">
<wsdl:part name="parameters"
element="tns:ZSVC_EMPLOYEE_DATAResponse" />
</wsdl:message>
- <wsdl:portType name="zsvc_employee_data">
- <wsdl:operation name="ZSVC_EMPLOYEE_DATA">
<wsdl:input message="tns:ZSVC_EMPLOYEE_DATA" />
<wsdl:output message="tns:ZSVC_EMPLOYEE_DATAResponse"
/>
</wsdl:operation>
</wsdl:portType>
Thanks for any help that anyone can provide.
Brian