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
Sandeep
I'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.
Similar Messages
-
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 -
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. -
Error consuming Web service from an ABAP Program
Hello guys,
I'm trying to consume a Web Service that is exposed in the internet. The conecction to the Web Service its via SSL.
I'm having a problem at the moment I call the web service from my abap program. But I'm able to test the same web service, from the SE80 tx with out trouble.
I have identify that there is a difference in the SOAP envelope, that its received in the Web service, when I call it from the test enviorment and when I call it from the program.
This is how it is received from the TEST tool (a succesfull call of th WS) :
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header><n0:Trace xmlns:n0="http://www.sap.com/webas/630/soap/features/runtime/tracing/"><TraceLevel xmlns="http://www.sap.com/webas/630/soap/features/runtime/tracing/">Error</TraceLevel></n0:Trace></soap-env:Header><soap-env:Body><nr1:putXMLDocument xmlns:nr1="http://bel.bci.cl/WsBEL/services/Carga"><body><?xml version="1.0" encoding="ISO-8859-1"?><Mensaje><RutEmpresa><Numero>76555400</Numero><Digito>4</Digito></RutEmpresa><RutUsuario><Numero>12307972</Numero><Digito>8</Digito></RutUsuario><Convenio>58422</Convenio><Pin>aro79728</Pin><Archivo><Tipo>PPR</Tipo><Plantilla>2142970592</Plantilla><Nombre>cargatest174.txt</Nombre><Cuerpo><![CDATA[G126919727 JORGE CRISTIAN VARGAS ROMERO 0000VVC01600000000000000000000245FAC0000000089900032000021030000010000000000190000 2910200714082008Boletas honorarios|]]></Cuerpo></Archivo><Fecha>20080814</Fecha></Mensaje></body></nr1:putXMLDocument></soap-env:Body></soap-env:Envelope>
And this is how it is received when I consume the web service from the ABAP program.
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header><n0:Trace xmlns:n0="http://www.sap.com/webas/630/soap/features/runtime/tracing/"><TraceLevel xmlns="http://www.sap.com/webas/630/soap/features/runtime/tracing/">Error</TraceLevel></n0:Trace></soap-env:Header><soap-env:Body><nr1:putXMLDocument xmlns:nr1="http://bel.bci.cl/WsBEL/services/Carga"><body><?xml version="1.0" encoding="utf-8" ?><nr1:putXMLDocument xmlns:nr1="http://bel.bci.cl/WsBEL/services/Carga"><body><?xml version="1.0" encoding="ISO-8859-1"?><Mensaje><RutEmpresa><Numero>76555400</Numero><Digito>4</Digito></RutEmpresa><RutUsuario><Numero>12307972</Numero><Digito>8</Digito></RutUsuario><Convenio>58422</Convenio><Pin>aro79728</Pin><Archivo><Tipo>PPR</Tipo><Plantilla>2142970592</Plantilla><Nombre>cargatest174.txt</Nombre><Cuerpo><![CDATA[G126919727 JORGE CRISTIAN VARGAS ROMERO 0000VVC01600000000000000000000245FAC0000000089900032000021030000010000000000190000 2910200714082008Boletas honorarios|]]></Cuerpo></Archivo><Fecha>20080814</Fecha></Mensaje></body></nr1:putXMLDocument></body></nr1:putXMLDocument></soap-env:Body></soap-env:Envelope>
As you can see, it is generating a nr1:putXMLDocument tag, that it should not go there.
Why do you think that this situation is happening? Please guys, this is very important, and need your help. Thanks in advance.
Samuel.BSP a Developer's Journal Part XIV - Consuming WebServices with ABAP
Calling WebServices from ABAP via HTTPS
Consuming Web Service from ABAP by Durairaj Athavan Raja
Search on SDN wiki, and you will find above mentioned links. -
Getting error in consuming google webservices from JspDynPage
Hi All,
Getting following error while consuming google webservices from JspDynPage
An exception occurred while processing a request for :
iView : GoogleSer.google
Component Name : GoogleSer.google
Could not find portal application com.company.global.enterprise.portal.wsdl.webservices.service.
Code :
MyGoogle googleService =
(MyGoogle) PortalRuntime.getRuntimeResources().getService("com.company.global.enterprise.portal.wsdl.webservices.service.MyGoogle");
GoogleSearchResult result = googleService.doGoogleSearch("google", "SAP", 0, 10, false, "", false, "", "", "");
ResultElement[] results = result.getResultElements();
if(results != null) {
response.write("<br> Search Result Size " +results.length );
for (int i = 0; i < results.length; i++) {
response.write((i + 1) + ": " + results);
Thanks
RudraHi,
I am still having the same problem, however the scenario in which I am getting varies.
I am getting this exception:
"com.sap.engine.services.webservices.jaxm.soap.accessor.NestedSOAPException: IOError while working with the message."
Some users when trying to login into the portal are getting blank screen and for some the portal launcher page is loading fine and could go to the Home Page.
When I view the logs I am seeing the Nested Soap Exception.
Any Ideas??? Starting the J2EE engine also did'nt help.
Thanks in advance.
Madhavi -
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 -
Problem while Consuming Java Webservice from WCF client
Hi,
I am trying to Consume Java Webservice from WCF client.The webservice main functionality is digital data management.The client can Query Digital data and upload digital data by calling webservice methods.Problem is when i am trying to call webmethod from WCF client its giving "Unrecognised message versions".I have no idea about how the message objects are processed at serverside.but at server side they have used JAXP for XML document parsing.
The response content type is Multipart/related and applicatio/XOP+XML.
Can u plz help me how to handle this situation.I have minimum knowledge in Java WS architecture.Basically i am .Net programmer.
Can U please guide me in a proper way to resolve the problem.Hi Abinash,
I have the same problem. Have you solve that problem?
I am using a java program to call a webservice too. And I have generated the client proxy definition for Stand alone proxy using NWDS. When I call the method of the webservice I am getting the correct result but along with the result I am getting one error and one warning message in the output.
The java code to call the webservice is as follows.
MIDadosPessoaisSyncService service = new MIDadosPessoaisSyncServiceImpl();
MIDadosPessoaisSync port = service.getLogicalPort("MIDadosPessoaisSyncPort");
port._setProperty("javax.xml.rpc.security.auth.username","xpto");
port._setProperty("javax.xml.rpc.security.auth.password","xpto");
String out = port.MIDadosPessoaisSync("xpto", "xpto");
System.out.println(out);
The result I am getting is :
Warning ! Protocol Implementation [com.sap.engine.services.webservices.jaxrpc.wsdl2java.features.builtin.MessageIdProtocol] could not be loaded (NoClassDefFoundError) !
Error Message is :com/sap/guid/GUIDGeneratorFactory
<b>The result of the WS is correct!!!</b>
The Java project does not have any warning. But the stand alone proxy project has following warnings associated with it.
This method has a constructor name MIDadosPessoaisSync.java
The import javax.xml.rpc.holders is never used MIDadosPessoaisSyncBindingStub.java
The import javax.xml.rpc.encoding is never used MIDadosPessoaisSyncBindingStub.java
The constructor BaseRuntimeException(ResourceAccessor, String, Throwable) is deprecated MIDadosPessoaisSyncBindingStub.java
It is very similar with your problem, could you help me?
Thanks
Gustavo Freitas -
How to consume WEB SERVICES from ABAP ??
Q: How to consume WEB SERVICES from ABAP program??
the point here is i am using SAP release 620 and the creation of proxy is out of scenario
and also no XI. Its only through ABAP program i need to consume one web service (its a HTTPS one ),
Using cl_http_client... i tried it but i am totally confused of whats happening ???
Req some senior ppl advice on the same/approach.
any hints will suffice my way of approach...!!!
Please do put in your valuable advices..!!
Thanks in advance..!!!!Hello Srinivas,
Following is the code for calling web service:
data: client type ref to if_http_client,
host type string value 'server url',
service type string value '8080',
path type string value '/sap/public/ping',
errortext type string,
proxy_service type string,
scheme type i value 1.
call method cl_http_client=>create
exporting host = host
service = service
proxy_host = host
proxy_service = service
scheme = scheme
importing client = client
exceptions
argument_not_found = 1
internal_error = 2
plugin_not_active = 3
others = 4.
case sy-subrc.
when 0.
write 'Server reached successfully'.
when others.
write: 'sy-subrc =', sy-subrc.
endcase.
Once you got the client object you can call following methods:
"Set the requrie URL for the web service you want to call. This is not WSDL anyway!!
cl_http_utility=>set_request_uri( request = client->request
uri =' url 2 be called ').
*Then you can call send method with proper inputs for sending request to WS
CALL METHOD client->send
Then you can use receive method for getting the response
CALL METHOD client->receive
*You can get last error in case of exceptions
CALL METHOD cl_http_client=>get_last_error
*Close the client object
CALL METHOD client->close
For more information on full code refer my link in previous replay.
Thanks,
Augustin.
Edited by: Augustarian on Aug 18, 2009 1:49 PM -
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 -
Windows authentification while consuming web service from ABAP
Hi All,
We are consuming web service from ABAP, we have created client proxy in SE80 and configured logical port in LPCONFIG.
This one was working fine. Now we have added windows user authentification to access this service.
Now when I'm trying to regenerate this proxy in R/3 it is asking for user and password. When I enter these details this one is not working.
If I access this service direcly from internet explorer and I enter same user and password then I would able to access this service.
Could you please let me know how to handle this.
Regards
VikramThe dialog that is produced by HTTP Destination object of the logical port is designed only for use within Classic Dynpro applications. There is no prompt produced when running in Web Dynpro. If possible assign a generic user within the logical port definition and this will be used automatically by all users.
-
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 -
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,
babuthe 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 -
Error While Consuming the webservice in ABAP
Hi,
I am trying to consume a webservice in ECC. I have imported the WSDL and generated the proxy. Did the configuration in the SOAMANAGER. While calling the webservice from the program I am getting the following error message. "SRT: Unsupported xstream found: ("HTTP Code 400 : Bad Request")"
Any help is appreciated.
Thanks
Raghavendra KuamrHi,
Check ST11 to find detailed log of issue, most likely you are passing "WS-A" message id along with request (check settings in SOAMANAGER Logical Port).
Try calling service after suppressing "Message Id transfer". See SAP Note: 1361688 and related notes in 0001292171
Regards,
Gourav
PS: please search forum before posting questions. -
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
-
Autocomplete is not working for Sharepoint 2013 search box.
I added the below code in cewp in sharepoint 2010 and autocomplete worked fine. http://sharesilver.wordpress.com/2011/11/26/auto-suggestioncomplete-in-sharepoint-search-text-box-with-jquery-like-in-google-part-1/#comment-605 when i added this code in
-
Lightroom 4 Nomenclature is confusing
I have used LR since version 1, and it my basic editing tool. Having just played with LR4 for the first time in the past two days, I like many of the upgrades a lot, but I do find the nomenclature confusing. The Histogram has five regions--Whites, Hi
-
PO Line item deletion and change documents
Hello All We have cases where when we delete certain lines of a Purchase order, a change document gets created while for certain other lines it doesn't. Has anyone expereienced this issue before ? Any solutions on how to resolve it please ?
-
hello to all! I have a problem with a user of the rooms. When this one tries to enter Calendar and sesions a mistake appears " The virtual directory indicated in the transport is not correct " does someone know that I can do to solve this mistake? Th
-
Query for collection is not function on SCCM 2012 R2
Hi, I have a System Center 2012 R2 Config Manager as single management point. The SCCM is already have Endpoint Protection Point role installed. Then I need to create a new collection that contain all SCEP clients, to as deployment target of a rule a