on 03-29-2010 12:10 PM
Hi guys, I'm really in trouble with a webservice problem.
To try to understand the Deserialization failure problem in a standard FM wrapped in a webservice, I realized on an ECC 6.0 the following FM and I wrapped it too in a WS
FUNCTION ZWSTEST.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(NAME) TYPE STRING
*" EXPORTING
*" VALUE(GREETING) TYPE STRING
*"----------------------------------------------------------------------
concatenate 'Hello ' name into greeting separated by ' '.
ENDFUNCTION.
In Visual Studio 2008 I realized this simple C# consumer after imported the FM WSDL.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AboutSapWS {
class Program {
static void Main( string[] args ) {
AboutSapWS.WsTest.ZwstestRequest req = new AboutSapWS.WsTest.ZwstestRequest();
AboutSapWS.WsTest.ZWSTEST tst = new AboutSapWS.WsTest.ZWSTESTClient();
try {
AboutSapWS.WsTest.ZwstestResponse rsp = tst.Zwstest( req );
System.Console.Out.WriteLine( "Ok, it works!" );
} catch( Exception ex ) {
System.Console.Out.WriteLine( "Error!\n" + ex.Message );
}
}
}
}
This program too fails with Deserialization failure.
I add another detail: I'm sure that the WS works fine because soapUI, for example, consumes it well.
Could it be caused by a customizing problem? If it could be help, when I try to test the WS from SICF, the page fails with HTTP 500.
Please, what can I do?
Ciao. Nicola
Hi Nicola,
The 'Test Service' from SICF will always return an HTTP 500 error because it's sending a get method. SOAP Protocol requires a POST method. Best test the webservice with SoapUI or WS Navigator.
You could maybe check the following...
- It could be a config issue on the consumer. Check the request message that being generated by the C# consumer. Specifically check the charset being used in the request. It should not be using ISO*...It should be using UTF-8
Regards, Trevor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.