on 01-07-2008 5:32 PM
Hi Experts,
I am building a Webservice inside a Web Dynpro for Abap Application and have a problem. The function module that I use for the webservice runs without any problems. The webservice runs to in a normal report. But when I use the same webservice in the web dynpro method, it doesn't work. There comes the following error:
Fehler (id=SOAP:14): Unexpected element -el=html ns=
I debugged the whole application and found the exact place where the error occurs.
It is in the class CL_SOAP_MESSAGE in the method GET_METHOD. The exact code line is:
if l_tag->qname-name ne if_soap_message~co_soap_env.
raisesoapunexpectedelement 1 l_tag->qname-name l_tag->qname-namespace. "#EC NOTEXT
endif.
the unexpected element is "html" in the variable qname-name.
if_soap_message~co_soap_env has the value "Envelope".
What can that be?
I don't know what to do. THanks a lot.
Best Regards
Ingmar
Hi Ingmar,
mostly you will get this message, if you don't supply user/password. Try to maintain a HTTP-Connection in SM59 with user/password and test the servive again.
Regards, Uwe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ingmar,
instead entering the URL in LPCONFIG you maintain the values in SM59 and only refer to the entry of SM59 in LPCONFIG.
Connection Type (Verbindungstyp): H (HTTP Connection to ABAP System)
Target Host (Zielmaschine): the hostname or IP address of your target system without Port number
Service No: the Port number of your target system (the number behind the ":" of the URL)
You can enter the path to the target service in either SM59 OR LPCONFIG.
Regards, Uwe
Hi Uwe,
I tried to follow your explanation, but I have problems with them. Where do I get the target host? I took the url out of my browser that I got, when I used the WSADMIN and then Web Service -> WSDL... But there I don't have an URL with a port, that I could erase. For example I had something like that:
http://XXXXXXX/sap/bc/srt/rfc/sap/Z_ITS_DI_PLM_CP_SEARCH_ORD_200?sap-client=200&wsdl=1.1
That I put into the SM59 target host with Port 80 because I didn't know another number. Always I get the message ICM_HTTP_CONNECTION_FAILED. Could you please describe the exact steps for getting a successfull connection if possible?
Thanks a lot!
Best Regards
Ingmar
Hi Ingmar,
In WSADMIN you can create a WSDL of the function. Please scroll down to the end of the WSDL. There is a line like this:
<soap:address location="http://erp.xxx.sap.com:80/sap/bc/srt/rfc/sap/....
erp.xxx.sap.com is the traget host
80 is the port
and /sap/bc/srt/rfc/sap is the path, which you can enter in SM59 OR LPCONDIG.
Rgds, Uwe
Sorry that my answer comes so late!! Perfect, your idea works!!
But now I have another problem. While the same debugging process I get another exception CX_SOAP_FAULT. The reason for it is in the class CL_SOAP_XP====================CP in the method XP_READ_TAG. There is the code
call 'XRfcConverter'
id 'METHOD' field tsxp_xp_read_tag
id '%_XP_REF' field my_xp_ref
id 'XMLTAG' field my_tag.
my_tag is a deep structure with the component NAME. And this NAME is a CString and ist set while the code above with "Fault". That "Fault" causes the thrown exception. Why comes the "Fault" to NAME?
Thats my problem. What can that be?
Thanks a lot again!!
Best Regards.
Ingmar
Edited by: Ingmar Kroll on Feb 18, 2008 4:15 PM
Hi Ingmar.
I am not the expert in this area, but when I was reseacrhing how to use WebServices in WDA I just created a proxy for a web service and built a wrapper FM for this proxy. This worked without any problems.
Cheers,
Sascha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ingmar.
I am not sure how you call the web service. What I did was generating a proxy:
http://help.sap.com/saphelp_nw04/helpdata/en/86/58cd3b11571962e10000000a11402f/content.htm by using the URL to a WSDL file. When I remember correctly you get a proxy class.
And with wrapper i mean that i created a function module which I called from WD4A. In this FM i created the proxy object and performed the WS call.
How do you call the webservice?
Cheers,
Sascha
User | Count |
---|---|
87 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.