Ping webservice from abap
Hi Guru's,
let me know how do we go along with pinging a webservice from ABAP.I have a requirement where in i have to ping and check weather the webservice exists or not. if it exits i have to proceed with the logic or else raise and exception.
here iam not able to find how ro ping and check weather the webservice is avilable or not.
thanks in advance,
babu
the best ping is a valid service call with a definitive negativ outcome, i.e. a purchase order for a non-existent product number or a material query for a non-existent material, etc...
this way you ping the service at all possible levels, including networks, proxies and firewalls, webserver availability, soap runtime availability, application availability(!).
anton
Similar Messages
-
Error Consuming a webservice from ABAP
Hi all,
I am consuming an external webservice from abap. I created teh proxy using WSDl file. While testing teh service its giving an exception like this-
"JAXB unmarshalling exception: Unable to create an instance of de.*******v2.MeldungType; nested exception is javax.xml.bind.UnmarshalExcept
ion: Unable to create an instance of de.****.MeldungType# - with linked exception:#[java.lang.InstantiationException]"
With a soapfaultcode: 1..
can any one help out in arriving at teh reason for this..
Regards
SandeepI've seen lots of unmarshalling errors whilst trying to consume web services via Web Dynpro Java... Usually, it was due to an inconsistency between the WSDL file being used and the underlying web service definition. It might be worth checking the WSDL you are using is correct and up to date, in case the underlying service interface has changed.
Also worth checking if you have any simple boolean type parameters defined as part of the service interface - they have to have a value assigned when you call the service and cannot be null.
HTH. -
Consume webservice from ABAP : SoapFaultCode:4
Hi ,
I need your valuable ideas in overcoming the problem mentioned below.
This problem relates to consumption of a webservice from ABAP - Client Proxy without XI. The system is WAS 6.40.
I had created a client proxy (along with the corresponding methods) using a WSDL file pasted below. I had also created a logical port for the proxy class generated.
When I test the interface for one of the methods , I get the following error message.
<u>Error Message</u>
<?xml version="1.0" encoding="utf-8" ?>
- <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
- <asx:values>
<SYSTEMFAULT href="#o103" />
</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="o103">
- <CX_ROOT>
<TEXTID>F63AFF63DBE4BB4786A7F52CC4167145</TEXTID>
<PREVIOUS />
<KERNEL_ERRID />
- <INTERNAL_SOURCE_POS>
<PROGID>193</PROGID>
<CONTID>1050</CONTID>
</INTERNAL_SOURCE_POS>
</CX_ROOT>
<CX_STATIC_CHECK />
- <CX_AI_SYSTEM_FAULT>
<CODECONTEXT>http://www.sap.com/xml_errorcodes</CODECONTEXT>
<CODE>SoapFaultCode:4</CODE>
<ERRORTEXT>System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: //10.136.129.245/PinnacleWebServices/DatabaseAvailable. at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest() at System.Web.Services.Protocols.SoapServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)</ERRORTEXT>
<LANGUAGE />
</CX_AI_SYSTEM_FAULT>
</cls:CX_AI_SYSTEM_FAULT>
</asx:heap>
</asx:abap>
<u>WDSL file used for creating the Client Proxy</u>
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="//10.136.129.245/PinnacleWebServices" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="//10.136.129.245/PinnacleWebServices" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="//10.136.129.245/PinnacleWebServices">
<s:element name="DatabaseAvailable">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="s_dbalias" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="DatabaseAvailableResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="DatabaseAvailableResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="AddCustomers">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="s_dbalias" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="s_xml" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="AddCustomersResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="AddCustomersResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="AddContracts">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="s_dbalias" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="s_xml" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="AddContractsResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="AddContractsResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="AddInstalledEquipment">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="s_dbalias" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="s_xml" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="AddInstalledEquipmentResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="AddInstalledEquipmentResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="AddProducts">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="s_dbalias" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="s_xml" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="AddProductsResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="AddProductsResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="AddCreditAlerts">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="s_dbalias" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="s_xml" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="bool_updatecustomers" type="s:boolean" />
<s:element minOccurs="1" maxOccurs="1" name="bool_updatecontracts" type="s:boolean" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="AddCreditAlertsResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="AddCreditAlertsResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="AddStockFigures">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="s_dbalias" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="s_xml" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="AddStockFiguresResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="AddStockFiguresResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="string" nillable="true" type="s:string" />
</s:schema>
</wsdl:types>
<wsdl:message name="DatabaseAvailableSoapIn">
<wsdl:part name="parameters" element="tns:DatabaseAvailable" />
</wsdl:message>
<wsdl:message name="DatabaseAvailableSoapOut">
<wsdl:part name="parameters" element="tns:DatabaseAvailableResponse" />
</wsdl:message>
<wsdl:message name="AddCustomersSoapIn">
<wsdl:part name="parameters" element="tns:AddCustomers" />
</wsdl:message>
<wsdl:message name="AddCustomersSoapOut">
<wsdl:part name="parameters" element="tns:AddCustomersResponse" />
</wsdl:message>
<wsdl:message name="AddContractsSoapIn">
<wsdl:part name="parameters" element="tns:AddContracts" />
</wsdl:message>
<wsdl:message name="AddContractsSoapOut">
<wsdl:part name="parameters" element="tns:AddContractsResponse" />
</wsdl:message>
<wsdl:message name="AddInstalledEquipmentSoapIn">
<wsdl:part name="parameters" element="tns:AddInstalledEquipment" />
</wsdl:message>
<wsdl:message name="AddInstalledEquipmentSoapOut">
<wsdl:part name="parameters" element="tns:AddInstalledEquipmentResponse" />
</wsdl:message>
<wsdl:message name="AddProductsSoapIn">
<wsdl:part name="parameters" element="tns:AddProducts" />
</wsdl:message>
<wsdl:message name="AddProductsSoapOut">
<wsdl:part name="parameters" element="tns:AddProductsResponse" />
</wsdl:message>
<wsdl:message name="AddCreditAlertsSoapIn">
<wsdl:part name="parameters" element="tns:AddCreditAlerts" />
</wsdl:message>
<wsdl:message name="AddCreditAlertsSoapOut">
<wsdl:part name="parameters" element="tns:AddCreditAlertsResponse" />
</wsdl:message>
<wsdl:message name="AddStockFiguresSoapIn">
<wsdl:part name="parameters" element="tns:AddStockFigures" />
</wsdl:message>
<wsdl:message name="AddStockFiguresSoapOut">
<wsdl:part name="parameters" element="tns:AddStockFiguresResponse" />
</wsdl:message>
<wsdl:message name="DatabaseAvailableHttpGetIn">
<wsdl:part name="s_dbalias" type="s:string" />
</wsdl:message>
<wsdl:message name="DatabaseAvailableHttpGetOut">
<wsdl:part name="Body" element="tns:string" />
</wsdl:message>
<wsdl:message name="AddCustomersHttpGetIn">
<wsdl:part name="s_dbalias" type="s:string" />
<wsdl:part name="s_xml" type="s:string" />
</wsdl:message>
<wsdl:message name="AddCustomersHttpGetOut">
<wsdl:part name="Body" element="tns:string" />
</wsdl:message>
<wsdl:message name="AddContractsHttpGetIn">
<wsdl:part name="s_dbalias" type="s:string" />
<wsdl:part name="s_xml" type="s:string" />
</wsdl:message>
<wsdl:message name="AddContractsHttpGetOut">
<wsdl:part name="Body" element="tns:string" />
</wsdl:message>
<wsdl:message name="AddInstalledEquipmentHttpGetIn">
<wsdl:part name="s_dbalias" type="s:string" />
<wsdl:part name="s_xml" type="s:string" />
</wsdl:message>
<wsdl:message name="AddInstalledEquipmentHttpGetOut">
<wsdl:part name="Body" element="tns:string" />
</wsdl:message>
<wsdl:message name="AddProductsHttpGetIn">
<wsdl:part name="s_dbalias" type="s:string" />
<wsdl:part name="s_xml" type="s:string" />
</wsdl:message>
<wsdl:message name="AddProductsHttpGetOut">
<wsdl:part name="Body" element="tns:string" />
</wsdl:message>
<wsdl:message name="AddCreditAlertsHttpGetIn">
<wsdl:part name="s_dbalias" type="s:string" />
<wsdl:part name="s_xml" type="s:string" />
<wsdl:part name="bool_updatecustomers" type="s:string" />
<wsdl:part name="bool_updatecontracts" type="s:string" />
</wsdl:message>
<wsdl:message name="AddCreditAlertsHttpGetOut">
<wsdl:part name="Body" element="tns:string" />
</wsdl:message>
<wsdl:message name="AddStockFiguresHttpGetIn">
<wsdl:part name="s_dbalias" type="s:string" />
<wsdl:part name="s_xml" type="s:string" />
</wsdl:message>
<wsdl:message name="AddStockFiguresHttpGetOut">
<wsdl:part name="Body" element="tns:string" />
</wsdl:message>
<wsdl:message name="DatabaseAvailableHttpPostIn">
<wsdl:part name="s_dbalias" type="s:string" />
</wsdl:message>
<wsdl:message name="DatabaseAvailableHttpPostOut">
<wsdl:part name="Body" element="tns:string" />
</wsdl:message>
<wsdl:message name="AddCustomersHttpPostIn">
<wsdl:part name="s_dbalias" type="s:string" />
<wsdl:part name="s_xml" type="s:string" />
</wsdl:message>
<wsdl:message name="AddCustomersHttpPostOut">
<wsdl:part name="Body" element="tns:string" />
</wsdl:message>
<wsdl:message name="AddContractsHttpPostIn">
<wsdl:part name="s_dbalias" type="s:string" />
<wsdl:part name="s_xml" type="s:string" />
</wsdl:message>
<wsdl:message name="AddContractsHttpPostOut">
<wsdl:part name="Body" element="tns:string" />
</wsdl:message>
<wsdl:message name="AddInstalledEquipmentHttpPostIn">
<wsdl:part name="s_dbalias" type="s:string" />
<wsdl:part name="s_xml" type="s:string" />
</wsdl:message>
<wsdl:message name="AddInstalledEquipmentHttpPostOut">
<wsdl:part name="Body" element="tns:string" />
</wsdl:message>
<wsdl:message name="AddProductsHttpPostIn">
<wsdl:part name="s_dbalias" type="s:string" />
<wsdl:part name="s_xml" type="s:string" />
</wsdl:message>
<wsdl:message name="AddProductsHttpPostOut">
<wsdl:part name="Body" element="tns:string" />
</wsdl:message>
<wsdl:message name="AddCreditAlertsHttpPostIn">
<wsdl:part name="s_dbalias" type="s:string" />
<wsdl:part name="s_xml" type="s:string" />
<wsdl:part name="bool_updatecustomers" type="s:string" />
<wsdl:part name="bool_updatecontracts" type="s:string" />
</wsdl:message>
<wsdl:message name="AddCreditAlertsHttpPostOut">
<wsdl:part name="Body" element="tns:string" />
</wsdl:message>
<wsdl:message name="AddStockFiguresHttpPostIn">
<wsdl:part name="s_dbalias" type="s:string" />
<wsdl:part name="s_xml" type="s:string" />
</wsdl:message>
<wsdl:message name="AddStockFiguresHttpPostOut">
<wsdl:part name="Body" element="tns:string" />
</wsdl:message>
<wsdl:portType name="Pinnacle_x0020_Web_x0020_ServicesSoap">
<wsdl:operation name="DatabaseAvailable">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Checks if a connection to the selected database is available.</documentation>
<wsdl:input message="tns:DatabaseAvailableSoapIn" />
<wsdl:output message="tns:DatabaseAvailableSoapOut" />
</wsdl:operation>
<wsdl:operation name="AddCustomers">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Customers within Service Director</documentation>
<wsdl:input message="tns:AddCustomersSoapIn" />
<wsdl:output message="tns:AddCustomersSoapOut" />
</wsdl:operation>
<wsdl:operation name="AddContracts">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Contracts within Service Director</documentation>
<wsdl:input message="tns:AddContractsSoapIn" />
<wsdl:output message="tns:AddContractsSoapOut" />
</wsdl:operation>
<wsdl:operation name="AddInstalledEquipment">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Installed Equipment within Service Director</documentation>
<wsdl:input message="tns:AddInstalledEquipmentSoapIn" />
<wsdl:output message="tns:AddInstalledEquipmentSoapOut" />
</wsdl:operation>
<wsdl:operation name="AddProducts">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Products within Service Director</documentation>
<wsdl:input message="tns:AddProductsSoapIn" />
<wsdl:output message="tns:AddProductsSoapOut" />
</wsdl:operation>
<wsdl:operation name="AddCreditAlerts">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add Credit Alerts to Customers and/or Contracts within Service Director. Warning - Will remove all credit alerts first as it assumes a full list is provided every time.</documentation>
<wsdl:input message="tns:AddCreditAlertsSoapIn" />
<wsdl:output message="tns:AddCreditAlertsSoapOut" />
</wsdl:operation>
<wsdl:operation name="AddStockFigures">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add Stock Figures to mobile_data_connector within Service Director in order that the PDA get updated.</documentation>
<wsdl:input message="tns:AddStockFiguresSoapIn" />
<wsdl:output message="tns:AddStockFiguresSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:portType name="Pinnacle_x0020_Web_x0020_ServicesHttpGet">
<wsdl:operation name="DatabaseAvailable">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Checks if a connection to the selected database is available.</documentation>
<wsdl:input message="tns:DatabaseAvailableHttpGetIn" />
<wsdl:output message="tns:DatabaseAvailableHttpGetOut" />
</wsdl:operation>
<wsdl:operation name="AddCustomers">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Customers within Service Director</documentation>
<wsdl:input message="tns:AddCustomersHttpGetIn" />
<wsdl:output message="tns:AddCustomersHttpGetOut" />
</wsdl:operation>
<wsdl:operation name="AddContracts">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Contracts within Service Director</documentation>
<wsdl:input message="tns:AddContractsHttpGetIn" />
<wsdl:output message="tns:AddContractsHttpGetOut" />
</wsdl:operation>
<wsdl:operation name="AddInstalledEquipment">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Installed Equipment within Service Director</documentation>
<wsdl:input message="tns:AddInstalledEquipmentHttpGetIn" />
<wsdl:output message="tns:AddInstalledEquipmentHttpGetOut" />
</wsdl:operation>
<wsdl:operation name="AddProducts">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Products within Service Director</documentation>
<wsdl:input message="tns:AddProductsHttpGetIn" />
<wsdl:output message="tns:AddProductsHttpGetOut" />
</wsdl:operation>
<wsdl:operation name="AddCreditAlerts">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add Credit Alerts to Customers and/or Contracts within Service Director. Warning - Will remove all credit alerts first as it assumes a full list is provided every time.</documentation>
<wsdl:input message="tns:AddCreditAlertsHttpGetIn" />
<wsdl:output message="tns:AddCreditAlertsHttpGetOut" />
</wsdl:operation>
<wsdl:operation name="AddStockFigures">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add Stock Figures to mobile_data_connector within Service Director in order that the PDA get updated.</documentation>
<wsdl:input message="tns:AddStockFiguresHttpGetIn" />
<wsdl:output message="tns:AddStockFiguresHttpGetOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:portType name="Pinnacle_x0020_Web_x0020_ServicesHttpPost">
<wsdl:operation name="DatabaseAvailable">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Checks if a connection to the selected database is available.</documentation>
<wsdl:input message="tns:DatabaseAvailableHttpPostIn" />
<wsdl:output message="tns:DatabaseAvailableHttpPostOut" />
</wsdl:operation>
<wsdl:operation name="AddCustomers">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Customers within Service Director</documentation>
<wsdl:input message="tns:AddCustomersHttpPostIn" />
<wsdl:output message="tns:AddCustomersHttpPostOut" />
</wsdl:operation>
<wsdl:operation name="AddContracts">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Contracts within Service Director</documentation>
<wsdl:input message="tns:AddContractsHttpPostIn" />
<wsdl:output message="tns:AddContractsHttpPostOut" />
</wsdl:operation>
<wsdl:operation name="AddInstalledEquipment">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Installed Equipment within Service Director</documentation>
<wsdl:input message="tns:AddInstalledEquipmentHttpPostIn" />
<wsdl:output message="tns:AddInstalledEquipmentHttpPostOut" />
</wsdl:operation>
<wsdl:operation name="AddProducts">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Products within Service Director</documentation>
<wsdl:input message="tns:AddProductsHttpPostIn" />
<wsdl:output message="tns:AddProductsHttpPostOut" />
</wsdl:operation>
<wsdl:operation name="AddCreditAlerts">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add Credit Alerts to Customers and/or Contracts within Service Director. Warning - Will remove all credit alerts first as it assumes a full list is provided every time.</documentation>
<wsdl:input message="tns:AddCreditAlertsHttpPostIn" />
<wsdl:output message="tns:AddCreditAlertsHttpPostOut" />
</wsdl:operation>
<wsdl:operation name="AddStockFigures">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add Stock Figures to mobile_data_connector within Service Director in order that the PDA get updated.</documentation>
<wsdl:input message="tns:AddStockFiguresHttpPostIn" />
<wsdl:output message="tns:AddStockFiguresHttpPostOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="Pinnacle_x0020_Web_x0020_ServicesSoap" type="tns:Pinnacle_x0020_Web_x0020_ServicesSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<wsdl:operation name="DatabaseAvailable">
<soap:operation soapAction="//10.136.129.245/PinnacleWebServices/DatabaseAvailable" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="AddCustomers">
<soap:operation soapAction="//10.136.129.245/PinnacleWebServices/AddCustomers" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="AddContracts">
<soap:operation soapAction="//10.136.129.245/PinnacleWebServices/AddContracts" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="AddInstalledEquipment">
<soap:operation soapAction="//10.136.129.245/PinnacleWebServices/AddInstalledEquipment" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="AddProducts">
<soap:operation soapAction="//10.136.129.245/PinnacleWebServices/AddProducts" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="AddCreditAlerts">
<soap:operation soapAction="//10.136.129.245/PinnacleWebServices/AddCreditAlerts" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="AddStockFigures">
<soap:operation soapAction="//10.136.129.245/PinnacleWebServices/AddStockFigures" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="Pinnacle_x0020_Web_x0020_ServicesHttpGet" type="tns:Pinnacle_x0020_Web_x0020_ServicesHttpGet">
<http:binding verb="GET" />
<wsdl:operation name="DatabaseAvailable">
<http:operation location="/DatabaseAvailable" />
<wsdl:input>
<http:urlEncoded />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="AddCustomers">
<http:operation location="/AddCustomers" />
<wsdl:input>
<http:urlEncoded />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="AddContracts">
<http:operation location="/AddContracts" />
<wsdl:input>
<http:urlEncoded />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="AddInstalledEquipment">
<http:operation location="/AddInstalledEquipment" />
<wsdl:input>
<http:urlEncoded />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="AddProducts">
<http:operation location="/AddProducts" />
<wsdl:input>
<http:urlEncoded />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="AddCreditAlerts">
<http:operation location="/AddCreditAlerts" />
<wsdl:input>
<http:urlEncoded />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="AddStockFigures">
<http:operation location="/AddStockFigures" />
<wsdl:input>
<http:urlEncoded />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="Pinnacle_x0020_Web_x0020_ServicesHttpPost" type="tns:Pinnacle_x0020_Web_x0020_ServicesHttpPost">
<http:binding verb="POST" />
<wsdl:operation name="DatabaseAvailable">
<http:operation location="/DatabaseAvailable" />
<wsdl:input>
<mime:content type="application/x-www-form-urlencoded" />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="AddCustomers">
<http:operation location="/AddCustomers" />
<wsdl:input>
<mime:content type="application/x-www-form-urlencoded" />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="AddContracts">
<http:operation location="/AddContracts" />
<wsdl:input>
<mime:content type="application/x-www-form-urlencoded" />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="AddInstalledEquipment">
<http:operation location="/AddInstalledEquipment" />
<wsdl:input>
<mime:content type="application/x-www-form-urlencoded" />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="AddProducts">
<http:operation location="/AddProducts" />
<wsdl:input>
<mime:content type="application/x-www-form-urlencoded" />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="AddCreditAlerts">
<http:operation location="/AddCreditAlerts" />
<wsdl:input>
<mime:content type="application/x-www-form-urlencoded" />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="AddStockFigures">
<http:operation location="/AddStockFigures" />
<wsdl:input>
<mime:content type="application/x-www-form-urlencoded" />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Pinnacle_x0020_Web_x0020_Services">
<wsdl:port name="Pinnacle_x0020_Web_x0020_ServicesSoap" binding="tns:Pinnacle_x0020_Web_x0020_ServicesSoap">
<soap:address location="http://10.136.129.245/pinnaclewebservices/maintenance.asmx" />
</wsdl:port>
<wsdl:port name="Pinnacle_x0020_Web_x0020_ServicesHttpGet" binding="tns:Pinnacle_x0020_Web_x0020_ServicesHttpGet">
<http:address location="http://10.136.129.245/pinnaclewebservices/maintenance.asmx" />
</wsdl:port>
<wsdl:port name="Pinnacle_x0020_Web_x0020_ServicesHttpPost" binding="tns:Pinnacle_x0020_Web_x0020_ServicesHttpPost">
<http:address location="http://10.136.129.245/pinnaclewebservices/maintenance.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Thanks in advance.Hi Raja,
Thanks for your prompt reply. I tried changing in the WSDL file the SOAP action parameters (http) like you said and still I got the same error message while testing the interface.
I have corrected the problem by trying a different approach. Earlier I used file option for Client Proxy creation and I got the error message.
Now I created the Client Proxy by using the option URL/HTTP destination ( which was also showing errors earlier but it is OK now after our Network Specialists opened the concerned port.)
Your reply was usefull as it helped me to check the "Soap Action" in the "OPERATIONS" tab of the "LOGICAL PORT" for the client proxy. I have awarded the points for that.
I have seen your Blogs and the your replies to the questions in this form. I would like to thank you and all the like minded contributors of this forum. Keep up the good work.
Regards.
François -
Calling an existing webservice from ABAP ?
I am trying to call an existing webservice from abap and cannot seem to get it right.
We are on 640.
What are the steps I need to follow ?
The address of the test wsdl is http://obcbox:50000/EMWSApp/DCCGen?wsdl
and http://obcbox:50000/wsnavigator/jsps/explorer.jsp?localWS=RU1XU0FwcC9zYXAuY29tJTJGRU1XU0FwcEVhci9FTVdTYXBwLmphcg%3D%3D
I need to be able to send data to the dccGenerator so it can do its work.
Any help would be greatly appreciated.
Cheers Steve.The following code will call the web service and fill the data into internal table which was received from the Web service. This code will send & Receive the data from ABAP to Webservice.
Change the Header detail as per your Webservice.
REPORT ZWORKORDER.
* Author : Raja T
* Company :******
TYPES: BEGIN OF OUTTAB1 ,
JOBCODE(20),
COMPONENTCODE(20),
ACCURATEHOURS(20),
ACCURATECOST(20),
LENGTH TYPE I,
END OF OUTTAB1 .
DATA: OUTTAB TYPE TABLE OF OUTTAB1.
DATA: TAB TYPE OUTTAB1.
DATA: WF_O LIKE LINE OF OUTTAB .
DATA: XSLT_ERR TYPE REF TO CX_XSLT_EXCEPTION .
DATA: RLENGTH TYPE I,
TXLEN TYPE STRING .
DATA: HTTP_CLIENT TYPE REF TO IF_HTTP_CLIENT .
DATA: WF_STRING TYPE STRING .
DATA: WF_STRING1 TYPE STRING .
DATA: WF_PROXY TYPE STRING ,
WF_PORT TYPE STRING .
CLEAR WF_STRING .
* Form the input string to send the Input Data to Web service.
CONCATENATE
'<?xml version="1.0" encoding="utf-8"?>'
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'
' <soap:Body>'
' <GetWorkOrder xmlns="http://*******erica.net/webservices/">'
' <nWorkOrder>2</nWorkOrder>'
' <nDistributorCode>4871</nDistributorCode>'
' <model>HM400</model>'
' <type>1 </type>'
' </GetWorkOrder>'
' </soap:Body>'
'</soap:Envelope>'
INTO WF_STRING .
CLEAR :RLENGTH , TXLEN .
RLENGTH = STRLEN( WF_STRING ) .
MOVE: RLENGTH TO TXLEN .
CLEAR: WF_PROXY, WF_PORT .
CALL METHOD CL_HTTP_CLIENT=>CREATE
EXPORTING
HOST = '192.168.1.41' "'http://****merica.net/webservices'
SERVICE = '8080'
SCHEME = '1'
IMPORTING
CLIENT = HTTP_CLIENT.
HTTP_CLIENT->PROPERTYTYPE_LOGON_POPUP = HTTP_CLIENT->CO_DISABLED.
CALL METHOD HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
EXPORTING
NAME = '~request_method'
VALUE = 'POST'.
CALL METHOD HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
EXPORTING
NAME = '~server_protocol'
VALUE = 'HTTP/1.1'.
CALL METHOD HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
EXPORTING
NAME = '~request_uri'
VALUE = '/service/accurate/workorder.asmx?'.
CALL METHOD HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
EXPORTING
NAME = 'Content-Type'
VALUE = 'text/xml; charset=utf-8'.
CALL METHOD HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
EXPORTING
NAME = 'Content-Length'
VALUE = TXLEN.
CALL METHOD HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
EXPORTING
NAME = 'SOAPAction'
VALUE = 'http://********merica.net/webservices/GetWorkOrder'.
CALL METHOD HTTP_CLIENT->REQUEST->SET_CDATA
EXPORTING
DATA = WF_STRING
OFFSET = 0
LENGTH = RLENGTH.
* Send the Input Data to Web service.
CALL METHOD HTTP_CLIENT->SEND
EXCEPTIONS
HTTP_COMMUNICATION_FAILURE = 1
HTTP_INVALID_STATE = 2.
* Receive the Input from Web Serice.
CALL METHOD HTTP_CLIENT->RECEIVE
EXCEPTIONS
HTTP_COMMUNICATION_FAILURE = 1
HTTP_INVALID_STATE = 2
HTTP_PROCESSING_FAILED = 3.
CLEAR WF_STRING1 .
WF_STRING1 = HTTP_CLIENT->RESPONSE->GET_CDATA( ).
DATA: LENGTH TYPE I.
LENGTH = STRLEN( WF_STRING1 ).
DATA: VALUE_FIELD TYPE NAME_KOMP.
DATA: VALUE TYPE REF TO DATA.
FIELD-SYMBOLS: <FS_CONVERTED_DATA>.
DATA: TAB1 TYPE TABLE OF STRING.
DATA: FROM_LENGTH TYPE I VALUE 1.
DATA: TO_LENGTH TYPE I.
DATA: DIFF TYPE I.
DATA: START TYPE I VALUE 1.
DO.
* JOBCODE.
SEARCH WF_STRING1 FOR 'JobCode=' . "STARTING AT START .
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
FROM_LENGTH = SY-FDPOS .
FROM_LENGTH = FROM_LENGTH + 8.
SEARCH WF_STRING1 FOR 'JobDescription=' ."STARTING AT START ..
TO_LENGTH = SY-FDPOS .
DIFF = TO_LENGTH - FROM_LENGTH .
MOVE WF_STRING1+FROM_LENGTH(DIFF) TO TAB-JOBCODE.
TO_LENGTH = DIFF + TO_LENGTH.
SHIFT WF_STRING1 BY TO_LENGTH PLACES.
* COMPONENT CODE
SEARCH WF_STRING1 FOR 'ComponentCode=' .
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
FROM_LENGTH = SY-FDPOS .
FROM_LENGTH = FROM_LENGTH + 14.
SEARCH WF_STRING1 FOR 'ComponentDescription=' .
TO_LENGTH = SY-FDPOS .
DIFF = TO_LENGTH - FROM_LENGTH .
MOVE WF_STRING1+FROM_LENGTH(DIFF) TO TAB-COMPONENTCODE.
TO_LENGTH = DIFF + TO_LENGTH.
SHIFT WF_STRING1 BY TO_LENGTH PLACES.
* AccurateHours
SEARCH WF_STRING1 FOR 'AccurateHours=' .
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
FROM_LENGTH = SY-FDPOS .
FROM_LENGTH = FROM_LENGTH + 14.
SEARCH WF_STRING1 FOR 'AccurateCost='.
TO_LENGTH = SY-FDPOS .
DIFF = TO_LENGTH - FROM_LENGTH .
MOVE WF_STRING1+FROM_LENGTH(DIFF) TO TAB-ACCURATEHOURS.
TO_LENGTH = DIFF + TO_LENGTH.
* AccurateCost
SEARCH WF_STRING1 FOR 'AccurateCost='.
FROM_LENGTH = SY-FDPOS.
FROM_LENGTH = FROM_LENGTH + 13.
SEARCH WF_STRING1 FOR '/>'.
TO_LENGTH = SY-FDPOS.
DIFF = TO_LENGTH - FROM_LENGTH .
MOVE WF_STRING1+FROM_LENGTH(DIFF) TO TAB-ACCURATECOST.
TO_LENGTH = DIFF + TO_LENGTH.
SHIFT WF_STRING1 BY TO_LENGTH PLACES.
APPEND TAB TO OUTTAB.
ENDDO.
WRITE: (10) 'JOBCODE'.
WRITE (20) 'COMPONENTCODE'.
WRITE (30) 'ACCURATEHOURS'.
WRITE (40) 'ACCURATECOST'.
LOOP AT OUTTAB INTO TAB.
WRITE:/ TAB-JOBCODE .
WRITE (20) TAB-COMPONENTCODE.
WRITE (30) TAB-ACCURATEHOURS.
WRITE (40) TAB-ACCURATECOST.
ENDLOOP .
Message was edited by:
Raja T -
Calling webservices from ABAP via https/ssl with p12 certificates.
Hi all,
I have a problem with calling an external webservice via HTTPS.
I configured my system as indicate in the blog /people/jens.gleichmann/blog/2008/10/31/calling-webservices-from-abap-via-httpsssl-with-pfx-certificates but when I check the RFC connection the result is: ICM_HTTP_SSL_ERROR.
I check the ICM monitor and this is the result:
[Thr 11] Thu May 26 16:02:57 2011
[Thr 11] *** ERROR during SecudeSSL_SessionStart() from SSL_connect()==SSL_ERROR_SSL
[Thr 11] session uses PSE file "/usr/sap/SV5/DVEBMGS10/sec/SAPSSLHTTPS1.pse"
[Thr 11] SecudeSSL_SessionStart: SSL_connect() failed
secude_error 536875072 (0x20001040) = "received a fatal SSLv3 handshake failure alert message from the peer"
[Thr 11] >> Begin of Secude-SSL Errorstack >>
[Thr 11] WARNING in ssl3_read_bytes: (536875072/0x20001040) received a fatal SSLv3 handshake failure alert message from the peer
WARNING in ssl3_output_cert_chain: (12354/0x3042) No hierarchy certificate in FCPath
WARNING in reduce_FCPath_by_Issuer: (12354/0x3042) No hierarchy certificate in FCPath
[Thr 11] << End of Secude-SSL Errorstack
[Thr 11] SSL_get_state() returned 0x000021d0 "SSLv3 read finished A"
[Thr 11] Server's List of trusted CA DNames (from cert-request message):
[Thr 11] #1 " certificate 1
[Thr 11] #2 " certificate 2
[Thr 11] SSL NI-sock: local=ip peer=ip2
[Thr 11] <<- ERROR: SapSSLSessionStart(sssl_hdl=6000000000652010)==SSSLERR_SSL_CONNECT
[Thr 11] *** ERROR => IcmConnInitClientSSL: SapSSLSessionStart failed (-57): SSSLERR_SSL_CONNECT [icxxconn_mt.c 2012]
SAP_ABA 700 0012 SAPKA70012 Componenti validi per tutte le applicazioni
SAP_BASIS 700 0012 SAPKB70012 Componenti di base SAP
PI_BASIS 2005_1_700 0012 SAPKIPYJ7C PI_BASIS 2005_1_700
ST-PI 2008_1_700 0001 SAPKITLRD1 SAP Solution Tools Plug-In
SAP_BW 700 0013 SAPKW70013 SAP NetWeaver BI 7.0
SAP_AP 700 0010 SAPKNA7010 Piatt. d'applicazione SAP
CCM 200_700 0010 SAPK-27010INCCM CCM 200_700 : Add-On Supplement
SRM_PLUS 550 0010 SAPKIBK010 SRM_PLUS per mySAP SRM
SRM_SERVER 550 0010 SAPKIBKT10 SRM_SERVER
BI_CONT 703 0001 SAPKIBIIP1 Contenuto Business Intelligence
ST-A/PI 01L_BCO700 0000 - Servicetools for other App./Netweaver 04
What do you think about it?
Best regards,
Norberto.Don´t forget to set your proxy settings! Be sure that the application server could establish a connection to the external server.
From the BLog.
Thr 11 WARNING in ssl3_read_bytes: (536875072/0x20001040) received a fatal SSLv3 handshake failure alert message from the peer
From the Error.
Have you looked into the above details?
Thanks
SM -
Calling a Webservice From ABAP
Hi All,
Can We make a Webservice call From ABAP ???
Regards
VamsiVamsi,
1. The Following links were used by me when I was working with Web services XI:
Hope these links are useful to you.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/336365d3-0401-0010-9884-a651295aeaa9
http://help.sap.com/saphelp_nw04/helpdata/en/31/daa0404dd52b54e10000000a1550b0/frameset.htm
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ebb4c490-0201-0010-86be-88dd6fd46475
/people/siva.maranani/blog/2005/03/01/testing-xi-exposed-web-services
2. You can create webservices directly in the ABAP stack of CRM. To do so, refer to the following...
http://help.sap.com/saphelp_nw04/helpdata/en/9b/dad1ae3908ee44a5caf57e10918be9/frameset.htm
Web Services Development in ABAP [original link is broken] -
Hello,
I use the following code to call web service from abap, but in the method "http_client->receive" i see "http_communication_failure = 1" .
this is the code:
DATA: SMS_TEXT TYPE STRING,
SMS_TEXT_UTF TYPE STRING,
SEND_STRING TYPE STRING.
DATA: w_string TYPE string ,
w_result TYPE string ,
r_str TYPE string .
DATA: result_tab TYPE TABLE OF string.
DATA: http_client TYPE REF TO if_http_client.
SEND_STRING = 'http://www.currencyserver.de/webservice/currencyserverwebservice.asmx/getDollarValue?provider=AVERAGE¤cy=EUR'.
CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = SEND_STRING
IMPORTING
client = http_client
EXCEPTIONS
argument_not_found = 1
plugin_not_active = 2
internal_error = 3
others = 4.
if sy-subrc = 0.
CALL METHOD http_client->send
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2.
CALL METHOD http_client->receive
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3.
if sy-subrc = 0.
w_result = http_client->response->get_cdata( ).
REFRESH result_tab .
SPLIT w_result AT cl_abap_char_utilities=>cr_lf INTO TABLE result_tab .
loop at result_tab into w_result.
write :/ w_result.
endloop.
endif.
endif.
Any Idea?
thanks.
Ouail.*& Report ZBS_TEST
REPORT zbs_test.
*Data
DATA: xml_doc TYPE REF TO cl_xml_document,
node TYPE REF TO if_ixml_node,
value TYPE string,
lv_result TYPE string,
lv_service TYPE string,
lo_http_client TYPE REF TO if_http_client.
lv_service = 'http://www.currencyserver.de/webservice/currencyserverwebservice.asmx/getDollarValue?provider=AVERAGE¤cy=EUR'.
*Call method to invoke web service
cl_http_client=>create_by_url(
EXPORTING
url = lv_service
IMPORTING
client = lo_http_client
EXCEPTIONS
argument_not_found = 1
plugin_not_active = 2
internal_error = 3
OTHERS = 4 ).
lo_http_client->send(
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2 ).
lo_http_client->receive(
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3 ).
*Create XML parser object using xml returned from web service
CLEAR lv_result.
lv_result = lo_http_client->response->get_cdata( ).
CREATE OBJECT xml_doc.
xml_doc->parse_string( stream = lv_result ).
*Use XML parser to get initial row and then loop through all rows
CALL METHOD xml_doc->get_first_node
RECEIVING
node = node.
*Loop through xml document extracting the data into an internal table
WHILE NOT node IS INITIAL.
CLEAR value.
CALL METHOD node->get_value
RECEIVING
rval = value.
WRITE: / 'Value', value.
CALL METHOD node->get_next
RECEIVING
rval = node.
ENDWHILE.
Try this code it should work to retrieve your values from the webservice. -
How to connect external webservice from ABAP
Hi,
Please see code pasted below and tell me what is wrong.
We try to connect external webservice via https. Should I install certificate is SAP for this connection? (if YES, how can I do this?)
Should I configure something else in SAP to connect external webservice via https?
DATA: client type ref to if_http_client,
lv_content type String,
lv_xml_string type string,
lv_length type I,
lv_response type I,
lv_node type ref to IF_IXML_NODE,
lv_xml_doc type ref to cl_xml_document.
****Create the HTTP client
call method cl_http_client=>create_by_url
EXPORTING
url = 'http://services-demo.krd.pl/raina/1.0/KrdAPI.asmx'
IMPORTING
client = client
EXCEPTIONS
others = 1.
CALL METHOD CL_HTTP_CLIENT=>CREATE
EXPORTING
HOST = 'services-demo.krd.pl'
SERVICE = '443'
SCHEME = '2'
PROXY_HOST =
PROXY_SERVICE =
SCHEME = SCHEMETYPE_HTTP
SSL_ID =
SAP_USERNAME =
SAP_CLIENT =
IMPORTING
CLIENT = client.
EXCEPTIONS
ARGUMENT_NOT_FOUND = 1
PLUGIN_NOT_ACTIVE = 2
INTERNAL_ERROR = 3
others = 4
CONCATENATE
'<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
' xmlns:xsd="http://www.w3.org/2001/XMLSchema" '
'xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rain="http://raina.krd.pl">'
'<soapenv:Header/>'
'<soapenv:Body>'
'<rain:Login soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">'
'<id xsi:type="xsd:string">B03EB34F02</id>'
'<password xsi:type="xsd:string">Akquinet99</password>'
'<appId xsi:type="xsd:string">test</appId>'
'<appInstId xsi:type="xsd:string">test</appInstId>'
'<custom xsi:type="xsd:string">test</custom>'
'</rain:Login>'
'</soapenv:Body>'
'</soapenv:Envelope>'
INTO lv_content.
CALL METHOD client->request->set_header_field
EXPORTING
name = '~request_method'
value = 'POST'.
CALL METHOD client->REQUEST->SET_HEADER_FIELD
EXPORTING
NAME = '~request_uri'
VALUE = '/raina/1.0/KrdAPI.asmx?'.
CALL METHOD client->request->set_header_field
EXPORTING
name = 'Content-Type'
value = 'text/xml; charset=utf-8'.
call method client->request->set_header_field
EXPORTING
name = 'SOAPAction'
value = 'Login'.
lv_length = STRLEN( lv_content ).
call method client->request->set_cdata
EXPORTING
data = lv_content
offset = 0
length = lv_length.
****Make the call
client->send( ).
****Receive the Response Object
call method client->receive
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3
others = 4.
*****Get the response content
client->response->GET_STATUS( IMPORTING CODE = lv_response ).
lv_xml_string = client->response->get_cdata( ).
Regards,
MichalHI ,
Error in accessing External Web Service
Calling a secured external web service from ABAP
Edited by: A kumar on Aug 21, 2008 11:58 AM -
Problem while Calling Webservice from ABAP
Hello All,
I am Calling the Webservice using ABAP-Class from abap,i getting the following HTML response error from the Webservice.Can any one help me.
tional//EN">######
####td {font-family : Arial, Tahoma
, Helvetica, sans-serif; font-size : 14px;}##A:lin
k ##A:visited
##A:active ####
Thanks and Regards,
KamalIt is not finding the correct URL - hence the 404 - page not found error.
Correct the URL and try again. -
Call (consume) a webservice from ABAP for dummies
Hi
I find the documentation for this topic very confusing. It a badly structured mix of documentation of client scenarios, server scenarios and worst of all a lot of XI nonsense.
I need purely client scenario documentation without any info about XI and without any info about creating web services.
I just need to know how to consume a web based webservice in ABAP program. Where can I find this docu?
I have tried to generate proxies from different WSDL sources, but it always fails with different error messages.
Can anyone suggest a simple WSDL webservice usefull for testing my setup?
Best regards
Thomas Madsen NielsenYou are right, the help files do mix consuming and creating, but they do provide a list of steps for consuming and what you need to do. To consume a web service, the general steps you need to follow are:
- Create an extendable package with use accesses SAI_SXMS, SAI_TOOLS, SAPPINT
- Create a proxy class using the wizard in SE80 (right click on the package -> Create -> Enterprise Service) - the creation of the class depends on the WSDL document - you can either generate based on the url for the WSDL or download the WSDL document and import it as a file in the wizard. You may need to tinker with the WSDL document to get the class generation to complete successfully. Your WSDL is here: [http://maptp12.map24.com/map24/webservices1.5?soap=Map24Routing]
- Create a logical port in LPCONFIG or SOAMANAGER (assumes NW 7.0 SP14 or later) with information in the WSDL
- Create a program to consume the service method - it will look something like this (abbreviated):
DATA: gv_client_proxy TYPE REF TO zcwsbb_co_global_weather_soap,
gv_sys_exception TYPE REF TO cx_ai_system_fault.
DATA: gs_request TYPE zcwsbb_get_weather_soap_in,
gs_response TYPE zcwsbb_get_weather_soap_out,
gs_weather TYPE zst_currentweather.
DATA: gv_message TYPE string.
TRY.
CREATE OBJECT gv_client_proxy.
CALL METHOD gv_client_proxy->get_weather
EXPORTING
input = gs_request
IMPORTING
output = gs_response.
CATCH cx_ai_system_fault INTO gv_sys_exception.
CALL METHOD gv_sys_exception->if_message~get_text
RECEIVING
result = gv_message.
WRITE: gv_message.
FREE: gv_client_proxy, gv_sys_exception.
EXIT.
ENDTRY.
- Transform the response as required using ST or XSLT -
Execute external WebService from abap
Hi Gurus!
Is it possible to execute an external WebService from an abap function/program without using the XI?
Best regards,
Adrianoyou can do this.
if you are on WAS6.4 there is a tool available within ABAP work bench to generate client proxy.
if you are on WAS 6.20 then you have to use class cl_http_client to consume the webservice,
check out the following weblogs for code sample
Send SMS to India from ABAP
BSP a Developer's Journal Part XIV - Consuming WebServices with ABAP
Regards
Raja -
Problem while pinging Webservice from SUP 2.0
Hi ,
i am developing an SUP application using webservices.
I am unable to ping the webservice from SUP.
Using the following webservice: [http://www.currencyserver.de/webservice/currencyserverwebservice.asmx?WSDL]
I get the following error on pinging it.
com.sybase.sup.tooling.xml.XmlException: java.net.UnknownHostException: www.currencyserver.de
at com.sybase.sup.tooling.wsdl.WsdlParser.parseURL(WsdlParser.java:589)
at com.sybase.sup.tooling.wsdl.WsdlParser.parse(WsdlParser.java:68)
at com.sybase.uep.tooling.eis.WsEISOperationBuilder.<init>(WsEISOperationBuilder.java:70)
at com.sybase.uep.tooling.eis.WsEISOperationBuilder.<init>(WsEISOperationBuilder.java:51)
at com.sybase.uep.datasources.ws.views.WSConnection.initialize(WSConnection.java:154)
at com.sybase.uep.datasources.ws.views.WSConnection.<init>(WSConnection.java:38)
at com.sybase.uep.datasources.ws.views.WSConnectionFactory.createConnection(WSConnectionFactory.java:28)
at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(Unknown Source)
at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(Unknown Source)
at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(Unknown Source)
at org.eclipse.datatools.connectivity.ui.PingJob.run(Unknown Source)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.net.UnknownHostException: www.currencyserver.de
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:970)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
at com.sybase.sup.tooling.wsdl.WsdlParser.parseURL(WsdlParser.java:578)
Please let me know the solution.
Regards,
Jitendra KansalHi Guru,
i saved that page in form of .WSDL file and it worked. thanks for it.
but the problem is while creating MBO
step 1. i selected a data type as webservice and connection profile CurrencyConversionServices
step2. then i selected the "GetCurrencyvalue" operation that import a provider agency, a source and destination currency and exports the exvhange rate.
step3. when i am giving some default values for
provider >> "AVERAGE"
Source Currency>> "ARS"
Destination Currency>> "USD"
when i am moving on next screen it is throwing the following error.
Error occurred during execution, please check the default Values of the selected input parameters and refresh again.
Reason: www.currencyserver.de
when i am clicking on Details to check it is showing...
www.currencyserver.de
www.currencyserver.de
java.net.UnknownHostException: www.currencyserver.de
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)
java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
java.net.Socket.connect(Socket.java:529)
java.net.Socket.connect(Socket.java:478)
java.net.Socket.<init>(Socket.java:375)
java.net.Socket.<init>(Socket.java:249)
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:79)
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:121)
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706)
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1321)
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:386)
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:560)
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76)
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:400)
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)
org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
com.sybase.vader.da.ws.soap.SoapInteractionOperation.execute(SoapInteractionOperation.java:498)
com.sybase.vader.statistics.MonitoringOperation.execute(MonitoringOperation.java:65)
com.sybase.vader.service.interaction.PipelineCompositeInteractionOperation.execute(PipelineCompositeInteractionOperation.java:55)
com.sybase.uep.tooling.eis.BaseEISOperation.execute(BaseEISOperation.java:265)
com.sybase.uep.tooling.eis.BaseEISOperation.execute(BaseEISOperation.java:165)
com.sybase.uep.tooling.eis.WsEISOperationImpl.execute(WsEISOperationImpl.java:808)
com.sybase.uep.tooling.ui.ModelsUtil.getEEISOperationMetaData(ModelsUtil.java:255)
com.sybase.uep.tooling.ui.mappertree.common.AttributesMapperDataBuilder.constructTargetRoot(AttributesMapperDataBuilder.java:104)
com.sybase.uep.tooling.ui.mappertree.common.AbstractMapperDataBuilder.build(AbstractMapperDataBuilder.java:37)
com.sybase.uep.tooling.ui.wizards.common.AttributesBottomUpWizard.createAttributes(AttributesBottomUpWizard.java:767)
com.sybase.uep.tooling.ui.wizards.common.AttributesBottomUpWizard$3.run(AttributesBottomUpWizard.java:643)
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Regards,
Jitendra -
Consume external webservice from ABAP
Hello all,
Can we consume external web service from ABAP??
If yes please gimme a sample code to do that..
Thanks in advance..
Regards,
MayaCan we consume external web service from ABAP in version 4.7??
-
Consuming Sharepoint webservice from Abap
Hi, I have a need to access a Sharepoint database from SAP. I am using the search.aspx webservice that sharepoint offers, or at least trying to. I set up an abap proxy from the WSDL that sharepoint supplied (which was not the best WSDL). From my ABAP I need to call the sharepoint service and I am having a little difficulty getting a result back.
Here is the ABAP code I have so far:
DATA: gr_query TYPE REF TO zgms_cycletimeco_query_service,
gs_input TYPE zgms_cycletimequery_soap_in,
gs_output TYPE zgms_cycletimequery_soap_out.
DATA: oref TYPE REF TO cx_root,
text TYPE string,
oref2 TYPE REF TO cx_root,
text2 TYPE string.
CREATE OBJECT gr_query.
CONCATENATE 'get_text( ).
ENDTRY.
I am trying to retrieve the record that contains HE2009-0624-084648 with no luck.
The error message I get says no results found.
Does anyone know what I am doing wrong? Do I need to specify the field in sharepoint that contains this data?
Thanks in advance,
RenéThanks for your reply. I actually tested today in SE80 on the proxy, and the request was formatted as:
<n0:Query xmlns:n0="urn:Microsoft.Search" xmlns:prx="urn:sap.com:proxy:PLD:/1SAI/TAS4ADD6B94366302A825F7:700:2007/10/04">
<n0:queryXml>This is a string 6</n0:queryXml>
</n0:Query>
When I execute it, the reponse is:
- <n0:QueryResponse xmlns:n0="urn:Microsoft.Search" xmlns:prx="urn:sap.com:proxy:PLD:/1SAI/TAS4ADD6B94366302A825F7:700:2007/10/04">
<n0:QueryResult><ResponsePacket xmlns="urn:Microsoft.Search.Response"><Response domain=""><Status>ERROR_BAD_REQUEST</Status><DebugErrorMessage>Data at the root level is invalid. Line 1, position 1.</DebugErrorMessage></Response></ResponsePacket></n0:QueryResult>
</n0:QueryResponse>
I don't really know what the format would be in between the queryXml tags. If anyone knows, please help!
Thanks. -
Consuming Webservice from ABAP Program
Hi, I need to consume a WebService https and with SSL. But to begin I tried to use a free webservice.
1-I cant create a Client Proxy, because the ppl from IT of the client dont want to do it.... so no SE80 -> Client Proxy.
The thing is if I use the method "call method cl_http_client=>create_by_destination" Creating of course a registry in the SM59, the free webservice works I can receive the info.
But If I use "call method cl_http_client=>create_by_url" It doesnt works I dont know why is this... I guess that its a IT or BASIS problem.
2- Anyway the method "create_by_destination" dont have a SSL parameter and the create_by_url it does, I find a place to set up SSL in the SM59 but I dont find where to put the name of the SSL that was created in the tx STRUST.
So my question is I can make it works a webservice https and SSL with the method "create_by_destination" or I have to use the "create_by_url" or "create" method.
ThanksHi, Sandra thx for the info. Im now passing this information to check if al the ICM and SSL seeting are correct.
Question in the SM59 in the "Logon/Security" tab I see the SSL activation option and a combo box to select the certificate. I only see two options:
ANONYM and DFAULT
If the Basis team added a SSL certificate in the STRUST it should appears in that combobox like a new entry ? or that combobox allways have only those 2 options.
Maybe you are looking for
-
How do I delete my iCloud account from Apple?
I have an iCloud account which I never used. Wanted to delete it to minimize the potential hazardous of being hacked.
-
IPad wont show .jpg images correctly
My new iPad wont show .jpg images correctly. They all get a yellow/blue filter almost like a negative photo. This is in Safari, Maps,Youtube and every App using .jpg images. Gifs, and png, viewing video etc is fine. Also the home screen background/wa
-
why is my ipod touch showing when synced to itunes that it has 4gb of apps when there are 9 apps on yet my iphone that has the same apps and lots more says it has less than 1gb, can anyone help please as cannot put any music on the ipod touch. thanks
-
Local fibre activation date keeps slipping who do ...
Who do I speak to about my local exchange as the fibre activation date slipping. Been promised by BT and openreach fibre services would launch in March 2011, but the launch keeps slipping back every three months and now to March 2013 Our exchange is
-
EXCEPT OR MINUS IN QUERY MANAGER
Hi, it Can say me how it do in query manager an query with EXCEPT (MINUS)??? For example: SELECT CardCode FROM OCRD EXCEPT SELECT CardCode FROM ORDR Thanks...