Page 1 of 1

Error calling external web service from SAP

Posted: Tue Apr 29, 2014 3:55 am
by Crnooka
Hi,

I generated proxy object and logical port in order to call external web service from SAP. Proxy object is generated from local WSDL file. Also, I put web service endpoint URL in logical port call parameters.

When I test proxy object from SE80, I get the following error:

Code: Select all

<?xml version="1.0" encoding="utf-8" ?> 
- <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
- <asx:values>
  <SYSTEMFAULT href="#o135" /> 
  </asx:values>
- <asx:heap xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:abap="http://www.sap.com/abapxml/types/built-in" xmlns:cls="http://www.sap.com/abapxml/classes/global" xmlns:dic="http://www.sap.com/abapxml/types/dictionary">
- <cls:CX_AI_SYSTEM_FAULT id="o135">
- <CX_ROOT>
  <TEXTID>F63AFF63DBE4BB4786A7F52CC4167145</TEXTID> 
  <PREVIOUS href="#o132" /> 
  <KERNEL_ERRID /> 
- <INTERNAL_SOURCE_POS>
  <PROGID>181</PROGID> 
  <CONTID>578</CONTID> 
  </INTERNAL_SOURCE_POS>
  </CX_ROOT>
  <CX_STATIC_CHECK /> 
- <CX_AI_SYSTEM_FAULT>
  <CODECONTEXT>Local</CODECONTEXT> 
  <CODE>SERIALIZE_APPLICATION_DATA</CODE> 
  <ERRORTEXT>Conversion error ABAP => XML (Request Message; error ID: CX_ST_REF_ACCESS; (/1SAI/TAE00000000000000000002 XML Bytepos.: 0 XML Path: Error Text: Error accessing the ref. node 'CONTROLLER') )</ERRORTEXT> 
  <LANGUAGE /> 
  </CX_AI_SYSTEM_FAULT>
  </cls:CX_AI_SYSTEM_FAULT>
- <cls:CX_XMS_SYSERR_PROXY id="o132">
- <CX_ROOT>
  <TEXTID>EA4E63A1C840484AAF087F129864ADA6</TEXTID> 
  <PREVIOUS href="#o126" /> 
  <KERNEL_ERRID /> 
- <INTERNAL_SOURCE_POS>
  <PROGID>0</PROGID> 
  <CONTID>0</CONTID> 
  </INTERNAL_SOURCE_POS>
  </CX_ROOT>
  <CX_STATIC_CHECK /> 
- <CX_XMS_SYSTEM_ERROR>
  <ID>SERIALIZE_APPLICATION_DATA</ID> 
  <P1>Request Message</P1> 
  <P2>CX_ST_REF_ACCESS</P2> 
  <P3>/1SAI/TAE00000000000000000002</P3> 
  <P4>XML Bytepos.: 0 XML Path: Error Text: Error accessing the ref. node 'CONTROLLER'</P4> 
  <INFO /> 
  <CATEGORY>XIProxy</CATEGORY> 
  <AREA>ABAP</AREA> 
  <RETRY>M</RETRY> 
  </CX_XMS_SYSTEM_ERROR>
- <CX_XMS_SYSERR_PROXY>
  <CO_AREA_ABAP>ABAP</CO_AREA_ABAP> 
  </CX_XMS_SYSERR_PROXY>
  </cls:CX_XMS_SYSERR_PROXY>
- <cls:CX_ST_REF_ACCESS id="o126">
- <CX_ROOT>
  <TEXTID>90A40E455E608D4D9DF1C01C4E90C6D9</TEXTID> 
  <PREVIOUS /> 
  <KERNEL_ERRID /> 
- <INTERNAL_SOURCE_POS>
  <PROGID>199</PROGID> 
  <CONTID>1118</CONTID> 
  </INTERNAL_SOURCE_POS>
  </CX_ROOT>
  <CX_DYNAMIC_CHECK /> 
  <CX_TRANSFORMATION_ERROR /> 
- <CX_ST_ERROR>
  <ST_PROGNAME>/1SAI/TAE00000000000000000002</ST_PROGNAME> 
  <X-ML_OFFSET>0</X-ML_OFFSET> 
  <X-ML_PATH /> 
  <ST_IC>717</ST_IC> 
  <ST_TIMESTAMP>20140428142202</ST_TIMESTAMP> 
  </CX_ST_ERROR>
- <CX_ST_REF_ACCESS>
  <REF_NAME>CONTROLLER</REF_NAME> 
  </CX_ST_REF_ACCESS>
  </cls:CX_ST_REF_ACCESS>
  </asx:heap>
  </asx:abap>
I noticed that in input and output parameters of proxy object there is no 'CONTROLLER' component generated at any level. I suppose this caused the error, and if so, the actual problem is why this component didn't get generated. Is maybe the WSDL file somehow uncompleted or something else could be a reason? Any help would be appreciated. Here is the WSDL file:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!--Created by TIBCO WSDL-->
-<wsdl:definitions targetNamespace="http://..." name="Untitled" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns0="http://..." xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://...">
-<wsdl:types>
-<xs:schema targetNamespace="http://..." attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://...">
-<xs:element name="Items">
-<xs:complexType>
-<xs:sequence>
<xs:element ref="ns0:value"/>
<xs:element ref="ns0:characteristic"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-<xs:element name="Notify">
-<xs:complexType>
-<xs:sequence>
<xs:element ref="ns0:eiMessageContext"/>
<xs:element ref="ns0:data"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-<xs:complexType name="empty">
<xs:sequence> </xs:sequence>
</xs:complexType>
-<xs:complexType name="NotificationResponse">
-<xs:sequence>
<xs:element name="NotifyResponse" type="ns0:empty" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
-<xs:element name="NotifyOutput">
-<xs:complexType>
-<xs:sequence>
<xs:element ref="ns0:eiMessageContext"/>
<xs:element name="data" type="ns0:NotificationResponse" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-<xs:element name="RequestAttributeValueChangeEvent">
-<xs:complexType>
-<xs:sequence>
<xs:element ref="ns0:tEvent"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="applicationDN" type="xs:string"/>
<xs:element name="characteristic" type="xs:string"/>
<xs:element name="correlationId" type="xs:string"/>
-<xs:element name="data">
-<xs:complexType>
-<xs:sequence>
<xs:element ref="ns0:notify"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-<xs:element name="describedBy">
-<xs:complexType>
-<xs:sequence>
<xs:element ref="ns0:Items" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-<xs:element name="eiMessageContext">
-<xs:complexType>
-<xs:sequence>
<xs:element ref="ns0:target"/>
<xs:element ref="ns0:sender"/>
<xs:element ref="ns0:correlationId"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="eventTime" type="xs:string"/>
-<xs:element name="key">
-<xs:complexType>
-<xs:sequence>
<xs:element ref="ns0:type"/>
<xs:element ref="ns0:primaryKey"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-<xs:element name="materialRecords">
-<xs:complexType>
-<xs:sequence>
<xs:element ref="ns0:oItem" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-<xs:element name="notificationMessage">
-<xs:complexType>
-<xs:sequence>
<xs:element ref="ns0:RequestAttributeValueChangeEvent"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-<xs:element name="notify">
-<xs:complexType>
-<xs:sequence>
<xs:element ref="ns0:notificationMessage"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-<xs:element name="oItem">
-<xs:complexType>
-<xs:sequence>
<xs:element ref="ns0:describedBy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-<xs:element name="orderItems">
-<xs:complexType>
-<xs:sequence>
<xs:element ref="ns0:oItem" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="ns0:materialRecords" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-<xs:element name="ordervalue">
-<xs:complexType>
-<xs:sequence>
<xs:element ref="ns0:key"/>
<xs:element ref="ns0:describedBy"/>
<xs:element ref="ns0:orderItems"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="primaryKey" type="xs:string"/>
<xs:element name="sender" type="xs:string"/>
-<xs:element name="tEvent">
-<xs:complexType>
-<xs:sequence>
<xs:element ref="ns0:applicationDN"/>
<xs:element ref="ns0:eventTime" minOccurs="0"/>
<xs:element ref="ns0:ordervalue"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="target" type="xs:string"/>
<xs:element name="type" type="xs:string"/>
<xs:element name="value" type="xs:string"/>
</xs:schema>
</wsdl:types>
-<wsdl:message name="Notify">
<wsdl:part name="parameter" element="ns0:Notify"/>
</wsdl:message>
-<wsdl:message name="NotifyOutput">
<wsdl:part name="parameter" element="ns0:NotifyOutput"/>
</wsdl:message>
-<wsdl:portType name="Notify">
-<wsdl:operation name="Notify">
<wsdl:input message="tns:Notify"/>
<wsdl:output message="tns:NotifyOutput"/>
</wsdl:operation>
</wsdl:portType>
-<wsdl:binding name="NotifyEndpoint1Binding" type="tns:Notify">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
-<wsdl:operation name="Notify">
<soap:operation style="document" soapAction="Notify"/>
-<wsdl:input>
<soap:body use="literal" parts="parameter"/>
</wsdl:input>
-<wsdl:output>
<soap:body use="literal" parts="parameter"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
-<wsdl:service name="Service">
-<wsdl:port name="NotifyEndpoint1" binding="tns:NotifyEndpoint1Binding">
<soap:address location="http://localhost:8012/ShareFolder/Service.serviceagent/NotifyEndpoint1"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Tnx in advance.

Re: Error calling external web service from SAP

Posted: Tue Apr 29, 2014 4:26 am
by Gothmog
There is a CONTROLLER table component (type PRXCTRLTAB, Control Flags for Fields of a Structure) in most of the generated proxy structures - maybe that's the CONTROLLER referred in the error.

Re: Error calling external web service from SAP

Posted: Tue Apr 29, 2014 4:48 am
by Crnooka
Yes I know. In all previous interfaces I worked on, 'CONTROLLER' always gets created, but I always had URL for WSDL file. This time I got local WSDL file, so I am suspicious this file misses something. Any idea?