Webservice in ABAP using Attachments
Hi,
as far is I was able to find similar questions it seems that Abap is not supporting attachments for webservices (at least not for 6.20 or 6.40).
I want to send a file (e.g. Pdf, Wrd) with a webservice but when I try to create a rfc enabled function i am not allowed to use a STRING or XSTRING in a table parameter. I need to have a table because there could more than one files to send.
Is there a better way to do that than cutting the file into a char type with a defined lenght and fill a table and rebuild it on the receiver side?
Thanks,
Christoph
Rather than using a TABLES parameter, use IMPORTING / EXPORTNIG / CHANGING parameters using a table type.
You can then use type STRINGTAB - a table of strings.
Michael
Similar Messages
-
Consuming a webservice in ABAP ECC 6.0 without using XI/ PI
Hi Experts,
I wanted to consume an external webservice without using XI / PI.After doing my homework and search on sdn I came to know that we can consume webservices in ABAP using proxies using SE80(Enterprise Services).
I am trying to create a client proxy with the URL of webservice.It asks me the option to choose between URL or HTTP.
I am selecting URL and in the second screen it asks about the package details and after that it finishes.Later I get an error message stating "NO VENDOR SPECIFIED".Its not allowing me to create a proxy.
So, here are my questions.
Does anyone faced the same kind of problem?
Can we really consume a webservice without using XI / PI or any other middleware?
Is it possible to consume the webservice only with URL or WSDL file ?
Please let me know the exact process.
Thanks in Advance.
Shanker Pandey.Hi Martin,
Please check these following links. Though you have reported already, these may help
Proxy Object generation error using Wizard for Web Service Consumption
Also, please have a look @ /people/thomas.jung/blog/2006/03/13/develop-a-web-service-that-sends-an-email--in-abap-netweaver-04s
Hope this helps,
Karthik -
Problem when trying to use Google WebService with abap
Hello,
I want to call a Google webservice from abap but I can't create the proxy class.
The WSDL of this webservice is located at
[<a href="http://api.google.com/GoogleSearch.wsdl">http://api.google.com/GoogleSearch.wsdl</a>
When I try to create the proxy class with transaction SE80, I have the following error message (SPRX046) : <i>Proxy generation terminated: Message must have exactly one part
</i>
Does anyone have an idea to solve this problem (We are in ECC 6.0 NW 2004S) ?
How can we do if <message> has multiple <part> entries ?
Thanks
JLGhi,
you can't create a proxy for the google API because Google's webservices are <b>RPC style</b> and the proxy wizard of WAS ABAP on NW2004s supports <b>document style</b> webservices only.
Search Google for the keywords mentioned and you'll find a lot of discussions and explanations of the difference of these two styles.
regards,
anton -
Consuming Webservice in ABAP: SoapFaultCode:1
Hi,
I have created a webservice with NetweaverDeveloperStudio and deployed it to a J2EE. I tested it with the "NDS-Webservice-Tester" and it worked fine.
I then created a proxy following the section for WebAS 640 in the weblog of Thomas Jung:
/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap
When using the "test-interface" function in SE80 (also described in Thomas weblog) I get the following result:
<CX_AI_SYSTEM_FAULT>
<CODECONTEXT>http://www.sap.com/xml_errorcodes</CODECONTEXT>
<CODE>SoapFaultCode:1</CODE>
<ERRORTEXT>
000D6019F1DD004000000036000020D8000405473991B26F:
Found 0 operation definitions using keys:
Key name:'first-body-element-ns'
key value: 'urn:EdilogUserManagementWebserviceWsd/EdilogUserManagementWebserviceVi/document';
Key name:'SoapRequestWrapper'
key value:'getCompany';
</ERRORTEXT>
<LANGUAGE />
</CX_AI_SYSTEM_FAULT>
Any idea what might cause this error? Is there a list with the SoapErrorCodes and their specific meanings?
Thanks and regards
Jan HempelI solved the problem "accidentally": The name of the Webservice was to long! Changing the name from "EdilogUserManagementWebservice" to "UserManagement" did the trick.
This is probably due to the restricted fieldlength of ABAP-programnames.
Regards
Jan Hempel -
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. -
How to save the data to sap abap using Adobe Flex
Hi Everybody......
I am new to Adobe flex with sap abap.
How to save the data in sap abap using Adobe Flex coding is Action Script and using RFC web service.
Please give me any suggisions on that.
Thank you
Venkatesh VHi Venkatesh,
Try with folowing coding...
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
initialize="initApp()">
<mx:Label x="10" y="23" text="Airline" width="90" id="lblAirline"/>
<mx:TextInput x="108" y="21" id="txtAirline"/>
<mx:Button x="10" y="49" label="Get Data" id="btnGetData" enabled="false" click="getData()"/>
<mx:DataGrid x="10" y="97" id="dgFlightData" dataProvider="">
</mx:DataGrid>
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.AbstractOperation;
import mx.rpc.events.FaultEvent;
import mx.rpc.soap.LoadEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.soap.WebService;
[Bindable] public var flightData:ArrayCollection;
private var flightWS:WebService;
private function initApp():void{
flightWS = new WebService();
flightWS.wsdl = "http://uscib20.wdf.sap.corp:50021/sap/bc/soap/wsdl11?services=ZGTEST&sap-client=000";
flightWS.addEventListener(FaultEvent.FAULT,onWSError);
flightWS.addEventListener(LoadEvent.LOAD,onWSDLLoaded);
flightWS.addEventListener(ResultEvent.RESULT,onFlightWSGotResult);
flightWS.loadWSDL();
private function getData():void{
var operation:AbstractOperation = flightWS.getOperation("ZGTEST");
var input:Object = new Object();
input.Airline = txtAirline.text.toUpperCase();
operation.arguments = input;
operation.send();
private function onWSError (event:FaultEvent):void{
private function onWSDLLoaded(event:LoadEvent):void{
btnGetData.enabled = true;
private function onFlightWSGotResult(event:ResultEvent):void{
flightData = event.result.SFLIGHT;
]]>
</mx:Script>
</mx:Application>
Regards,
Vinoth -
Consuming WebServices in ABAP WebDynPro via webservice proxy code
Hi,
My requirement is to consume a webservice using WSDL(basic authentication) in WebDynPro ABAP. then based on the SOAP response I need to show a pop up message whether the response valid or not.?
I first tested the webservice by creating LPCONFIG Logical Port and generated WebService Proxy class.
It got response correctly with basic authentication enabled each time I send a request.
Secondly I generated webservice proxy code using service calls on creating webdynpro test application with some UI elements. Service call created Nodes,attributes and method correctly.
it's giving me error when it tries to invoke webservice method through generated code.
Question is that How do we code authentication to the webservice method via WebDynPro ABAP code.
I appreciate anyone who worked on this area and taken basic authentication via coding. or worked successfully through coding.
Thanks
Praveenhi
Refer this:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6066fbe8-edc4-2910-9584-a9601649747d
It might be usefull for u.
Regards
Vivekananthan.S -
How to consume json webservice in abap?
hello every one please help me how to consume json format webservice in abap.
i am new in abap please help me out .
Thanks&Regards
~Ahmadhi check this,
First create a web service in SAP. The blog by Uwe Kunath descibes this clearly. Then create an Xcode project and use the ASIHTTPRequest wrapper to connect to the web service. Parse the response with the KissXML parser. A more out of the box solution is NetWeaver Gateway. It also let you use SAP web services but it also generates iOs code for you. SAP just released a trial version in de download section.
Example of ASIHTTPRequest
- (void)getFlightData:(NSString *) selectedDate {
NSURL *url = [NSURL URLWithString:@"http://abap.sapdev.nl:8000/sap/resources/flights/from/%/to/%/date/20110128?sap-client=001"];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request setUsername:@"BCUSER"];
[request setPassword:@"minisap"];
[request startSynchronous];
NSError *error = [request error];
if (!error) {
NSString *response = [request responseString];
[self parseXML:response];
Example of KissXML
-(void)parseXML:(NSString*)source {
NSError *error = nil;
DDXMLDocument *theDocument = [[DDXMLDocument alloc] initWithXMLString:source options:0 error:&error];
NSArray *results = [theDocument nodesForXPath:@"/asx:abap/asx:values/TAB/BAPISFLDAT" error:&error];
for (DDXMLElement *flightdetail in results) {
NSString *airlineid = [[flightdetail elementForName:@"AIRLINEID"] stringValue];
NSString *airline = [[flightdetail elementForName:@"AIRLINE"] stringValue]; -
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 -
Pros & Cons for consuming web services in ABAP using ABAP PROXY
Hi,
Other then performence is there any other disadvantages like security,etc for consuming web services in ABAP using ABAP proxy?
I really appreciate if some one provide the more details(Pros & Cons ) regarding cosuming web services and I also want to know is there any other way to consume web services in ABAP.
Thanks.<i> is there any other way to consume web services in ABAP</i>
you can use cl_http_client class to make your program to act as http client and post the soap message too webservice. This way you dont need to generate proxy, but you should know the soap message format.
Regards
Raja -
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 -
Error in Consuming Webservice in ABAP
Hello Experts,
I am very new to webservices in ABAP. just to test the webservice within ABAP, I created a Service Definition which gave me a WSDL URL using the Provider wizard. then I generated proxy class to consume the WSDL URL generated in previous step . I am calling the proxy class within a program as below. It is raising a exception CX_AI_SYSTEM_FAULT . Does anyone have idea what this could be and how to correct it?
TRY.
CALL METHOD TEST->ZTESSTHJKJH
EXPORTING
INPUT = INPUT
IMPORTING
OUTPUT = output
CATCH CX_AI_SYSTEM_FAULT .
CATCH CX_AI_APPLICATION_FAULT .
ENDTRY.
Thanks,
HarkamalHi Harkamal,
It seems that the webservice provider and consumer are on the same server (loopback). It's probably releated with network access. You can follow SAP Note Number 1009109 (Analyzing Web service problems using the ICF recorder) to track down the sent and received soap messages . Alternatively, you can download and use "Webservice Studio", a small freeware program to test the webservice easily. Official website is: [http://webservicestudio.codeplex.com/]
Good luck,
Ozcan. -
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 -
Webservice for soap with attachments
HI
I am try to develop webservice for soap with attachments for the sending images like jpg,tiff,gif.
it works fine when I statically attach the file
but when i pass dynamically the file name it will give me error for the call.invoke() method
Following is the code and the error details
I am using eclipse wtp2.0 and using weblogic appserver 8.1 and axis-1.4
that is my configuration details.
// This is my service code
import java.io.File;
import java.io.IOException;
import javax.activation.DataHandler;
import javax.activation.FileDataSource;
import javax.mail.MessagingException;
import javax.xml.soap.AttachmentPart;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPBodyElement;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPPart;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
import org.apache.axis.Message;
import org.apache.axis.MessageContext;
import org.apache.axis.message.SOAPEnvelope;
//import org.apache.axis.soap.MessageFactoryImpl;
import com.sun.corba.se.spi.activation.Repository;
public class AttachmentServer1
SOAPMessage msg = null;
Message response= null;
FileDataSource fileSource;
DataHandler dataHandler = null;
MessageContext context = null;
public void sendImage(String fileName) throws MessagingException, IOException{
try {
//java.lang.System.setProperty("javax.xml.soap.MessageFactory","com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl");
java.lang.System.setProperty("javax.xml.soap.MessageFactory","org.apache.axis.soap.MessageFactoryImpl");
MessageFactory fac = MessageFactory.newInstance();
msg = fac.createMessage();
context = MessageContext.getCurrentContext();
response = context.getRequestMessage();
if(msg != null){
System.out.println("From inside if statement");
//File f = new File("D:/1.png");
File f = new File(fileName);
fileSource = new FileDataSource(f);
dataHandler =new DataHandler(fileSource);
System.out.println("From inside if statement 1");
AttachmentPart part = msg.createAttachmentPart(dataHandler);
System.out.println("From inside if statement part");
//part.setContentType("image/jpeg");
//part.setMimeHeader("Content-Type", "image/jpg");
//part.setContent(dataHandler, "image/jpg");
SOAPPart soapPart = msg.getSOAPPart();
javax.xml.soap.SOAPEnvelope envelope = soapPart.getEnvelope();
SOAPBody body = envelope.getBody();
SOAPBodyElement bodyElement = body.addBodyElement(envelope.createName("attach"));
SOAPElement element = bodyElement.addChildElement(envelope.createName("parent"));
System.out.println("From inside if statement 2");
part.setContentId("axis");
msg.addAttachmentPart(part);
element.addAttribute(envelope.createName("href"), part.getContentId());
System.out.println("From inside if statement 3");
msg.saveChanges();
System.out.println("From inside if statement 4");
System.out.println(part.getContentId());
}else
try {
throw new Exception("Responce message is null");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SOAPException e) {
// TODO Auto-generated catch block
e.printStackTrace();
// This is the client code
import java.io.File;
import java.io.FileOutputStream;
import java.util.Iterator;
import javax.activation.DataHandler;
import javax.xml.namespace.QName;
import javax.xml.soap.AttachmentPart;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPException;
import org.apache.axis.Message;
import org.apache.axis.MessageContext;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.message.SOAPEnvelope;
public class AttachmentClient {
public static void getImage(){
try{
String endPoint = "http://localhost:7001/Test/services/AttchmentServer";
Service service = new Service();
Call call = (Call)service.createCall();
call.setOperationName(new QName("sendImage"));
call.setTargetEndpointAddress(endPoint);
call.setUseSOAPAction(true);
call.invoke(new Object[] {});
MessageContext context = call.getMessageContext();
Message msg = context.getCurrentMessage();
Iterator obj = msg.getAttachments();
while(obj.hasNext()){
try{
AttachmentPart part = (AttachmentPart) obj.next();
File graphFile = new File("test.jpg");
FileOutputStream outputStream = new FileOutputStream(graphFile);
DataHandler dataHandler = part.getDataHandler();
if(dataHandler != null){
dataHandler.writeTo(outputStream);
outputStream.flush();
System.out.println("File Saved at:"+graphFile.getAbsolutePath());
}else{
System.out.println("null");
}catch(Exception e){
e.printStackTrace();
}catch(Exception e){
e.printStackTrace();
public static void main(String args[]) throws SOAPException
getImage();
// The error is something like that
- Exception:
java.lang.RuntimeException: javax.mail.MessagingException: Error in input stream;
nested exception is:
java.io.IOException: End of stream encountered before final boundary marker.AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: javax.mail.MessagingException: Error in input stream;
nested exception is:
java.io.IOException: End of stream encountered before final boundary marker.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:javax.mail.MessagingException: Error in input stream;
nested exception is:
java.io.IOException: End of stream encountered before final boundary marker.
at javax.mail.internet.InternetHeaders.load(InternetHeaders.java:122)
at javax.mail.internet.InternetHeaders.<init>(InternetHeaders.java:93)
at org.apache.axis.attachments.MultiPartRelatedInputStream.readTillFound(MultiPartRelatedInputStream.java:499)
at org.apache.axis.attachments.MultiPartRelatedInputStream.readAll(MultiPartRelatedInputStream.java:433)
at org.apache.axis.attachments.MultiPartRelatedInputStream.getAttachments(MultiPartRelatedInputStream.java:439)
at org.apache.axis.attachments.AttachmentsImpl.mergeinAttachments(AttachmentsImpl.java:171)
at org.apache.axis.attachments.AttachmentsImpl.getAttachmentByReference(AttachmentsImpl.java:341)
at org.apache.axis.encoding.DeserializationContext.getObjectByRef(DeserializationContext.java:617)
at org.apache.axis.encoding.ser.JAFDataHandlerDeserializer.populateDataHandler(JAFDataHandlerDeserializer.java:74)
at org.apache.axis.encoding.ser.JAFDataHandlerDeserializer.startElement(JAFDataHandlerDeserializer.java:59)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.client.Call.invoke(Call.java:2467)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at AttachmentClient2.getImage(AttachmentClient2.java:27)
at AttachmentClient2.main(AttachmentClient2.java:58)
{http://xml.apache.org/axis/}hostname:solusoft18
javax.mail.MessagingException: Error in input stream;
nested exception is:
java.io.IOException: End of stream encountered before final boundary marker.
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.attachments.MultiPartRelatedInputStream.readTillFound(MultiPartRelatedInputStream.java:609)
at org.apache.axis.attachments.MultiPartRelatedInputStream.readAll(MultiPartRelatedInputStream.java:433)
at org.apache.axis.attachments.MultiPartRelatedInputStream.getAttachments(MultiPartRelatedInputStream.java:439)
at org.apache.axis.attachments.AttachmentsImpl.mergeinAttachments(AttachmentsImpl.java:171)
at org.apache.axis.attachments.AttachmentsImpl.getAttachmentByReference(AttachmentsImpl.java:341)
at org.apache.axis.encoding.DeserializationContext.getObjectByRef(DeserializationContext.java:617)
at org.apache.axis.encoding.ser.JAFDataHandlerDeserializer.populateDataHandler(JAFDataHandlerDeserializer.java:74)
at org.apache.axis.encoding.ser.JAFDataHandlerDeserializer.startElement(JAFDataHandlerDeserializer.java:59)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.client.Call.invoke(Call.java:2467)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at AttachmentClient2.getImage(AttachmentClient2.java:27)
at AttachmentClient2.main(AttachmentClient2.java:58)
Caused by: javax.mail.MessagingException: Error in input stream;Hi David,
The "covert byte[] to a base64 encoded string" solution, is probably your best
bet given the scenario you described.
Regards,
Mike Wooten
"David Ruana" <[email protected]> wrote:
>
Weblogic 6.1 (SP2) does not support SOAP with attachments. In the meanwhile,
what
is the best approach in order to send a SOAP message which has binary
data?
My EJB is currently receiving a byte[] and returning also a byte[]. The
only solution
I can think of right now is to convert the byte[] into a String in base64
format.
Would you recommend that?
Thanks in advance. -
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
Maybe you are looking for
-
Poor Performance after start up and Frequent Crashes
I have a brand new imac i order a little over 6 months ago, i immediately migrated my old imac's files to the new mac and everything worked great but then slowly began to degrade in performance and now i have nothing but problems that have gotten wor
-
How to create a selectable symbol window/list/etc...
Hello, I am brand new to Flash and Actionscript and have a project I want to do. I would like to have a graphic area where I can display a list of graphics/symbols that could be dragged on to the stage or to a Movie clip to create a layout and do thi
-
Printing Header and Footer once in HTML and on all pages in RTF and PDF using one RDF
Hi, I am using a single RDF to generate reports in HTML,PDF and RTF. For printing the header only on the first page I used the following trigger begin srw.get_page_num (page_num); IF upper(:P_FORMAT) = 'HTML' THEN if page_num = 1 then return(true); e
-
I would like to use a utility or 3rd party app to go through my two 90gb libraries of photos (iPhoto libraries) and merge them while also removing duplicates and potentially trimming it (the library was originally but in iPhoto 08 or 07, probably) Ho
-
On initial startup, wi-fi not connected, must restart
Whenever I start up the iMac, the wi-fi fan is blank, and the error message says wi-fi hardware not connected. After I restart, everything works fine. Minor issue, but it would be nice if everything worked fine on initial startup.