on 07-29-2005 5:17 PM
Error of using SOAP HTTP Handler to expose BAPI as web service on ABAP WAS 6.40
Hi,
Could you help me figure out this problem?
At SAP ABAP Web application server 6.40 I use SOAP HTTP Handler to expose remote-enabled function module Z_BAPI_SALESORDER_CREATE as web service. I load the following WSDL endpoint in SAP web service navigator and an error has occurred: Cannot get endpoints from http://sbasap06.sba.uwm.edu:8002/sap/bc/soap/wsdl/?services=Z_BAPI_SALESORDER_CREATE&sap-client=201: CreateProcess: javac -nowarn -encoding Cp1252 -classpath "D:\usr\sap\X01\DVEBMGS03\j2ee\cluster\server0\apps\sap.com\com.sap.engine.services.webservices.tool\servlet_jsp\wsnavigator\root\WEB-INF\temp\ws1121792623344\proxy;D:\usr\sap\X01\DVEBMGS03\j2ee\cluster\server0\bin\ext\sapxmltoolkit\sapxmltoolkit.jar;D:\usr\sap\X01\DVEBMGS03\j2ee\cluster\server0\bin\ext\webservices_lib\webservices_lib.jar;D:\usr\sap\X01\DVEBMGS03\j2ee\cluster\server0\bin\ext\webservices_lib\jaxrpc-api.jar;D:\usr\sap\X01\DVEBMGS03\j2ee\cluster\server0\bin\ext\webservices_lib\jaxm-api.jar;D:\usr\sap\X01\DVEBMGS03\j2ee\cluster\server0\bin\ext\webservices_lib\saaj-api.jar;D:\usr\sap\X01\DVEBMGS03\j2ee\cluster\server0\bin\interfaces\webservices\webservices_api.jar;./bin/system/exception.jar;./bin/system/logging.jar; ;D:\usr\sap\X01\DVEBMGS03\j2ee\os_libs\jstartup.jar;.\bin\boot\boot.jar;.\bin\boot\jaas.jar;.\bin\system\bytecode.jar;." "D:\usr\sap\X01\DVEBMGS03\j2ee\cluster\server0\apps\sap.com\com.sap.engine.services.webservices.tool\servlet?
If this is an unexpected error, please contact your supporter.
However, using SOAP HTTP handler I can expose other BAPI/function module as web service, such as BAPI_SALESORDER_GETLIST. So why getlist work, but create not work? is it because create has more complex parameters?
Thanks,
Thomas
Hello Lin,
Have you been able to resolve this. I know it is a very old problem but still.
Maybe you can try the following and which might solve your problem:
Browse to the following link:
Here you can search for your RFM-implemented Web Service.
Now if you find your service then there will be wsdl link besides it:
Click on the link and a wsdl will open in the browser:
The <service_name> is not always the same as the name of the function module.
So if you want to use the SOAP HTTP Handler to consume the service please use the <service_name> above.
I hope this will solve your problem...
Thank you,
Ramneek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sanjeev,
I will compare the SOAP message generated by two environment --one from SAP web service navigator and another from Mindreef SOAPscope.
thanks,
Lin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas Jung,
Now let me backup from the complex Z_BAPI_SALESORDER_CREAT. I try for a simple SAP function STFC_CONNECTION, which I copy the source code and make it into Z_STFC_CONNECTION_LIN. Then I expose it as web service by creating virtual interface and web service definition. When generating SAP WSDL, I did not include SAP features. I save the WSDL at:
http://www.netweaver.sba.uwm.edu/linye/xi/Z_STFC_CONNECTION_LIN_WSD_715NOSAPFEATURES.xml. Then in Mindreef SOAPscope 4.1, I test it.
I get error:
Fault
{
faultcode = soap-env:Client,
[xml:lang = en]
faultstring = Deserialisation failed,
detail
{
SimpleTransformationFault
{
MainName = /1BCDWB/WSS0050715160241657285,
ProgName = /1BCDWB/WSS0050715160241657285,
Line = 10 ,
Valid = X,
MatchFault
{
DescriptionText = System expected the element '{urn:sap-com:document:sap:soap:functions:mc-style}ZStfcConnectionLin',
TokenType = S,
TokenName = ZStfcConnectionLin,
TokenNameSpace = empty,
TokenValue = empty
}
Caller
{
Class = CL_SRG_RFC_PROXY_CONTEXT,
Method = IF_SXML_PART~DECODE,
Positions = 1
}
}
}
}
So it sounds like some transformation problem. Any ideas?
Thanks!
Lin Thomas Ye
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lin,
It may not work but won't harm if you test your WSDL from XMLSPY. I have had problem generating ABAP proxy for Amazon web service but it worked from XMLSPY.
Other thing you can do is compare the SOAP message generated by two environment where it works and in the other where it doesn't work.
Cheers,
Sanjeev
Hi Thomas Jung,
Thanks for your WSDL. I will check it and compare to mine. Maybe I need to manually modify some parts. My SAP WAS 6.40 has only ABAP stack and not install any J2EE engine stuff. Maybe I need to update the patch first.
Thanks!
Lin Thomas Ye
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sanjeev and Thomas,
Thanks for both of your suggestions. I just check Z_BAPI_SALESORDER_CREATE is remote-enabled in /nSE37 attribute page of the BAPI. In fact on my SAP ABAP WAS 6.40 I have successfully expose BAPI_SALESORDER_GETLIST as web service in SOAP HTTP Handler way. Just feel curious why on the same box of 6.40, I can not expose complex create BAPI which is based on BAPI_SALESORDER_CREATEFROMDAT2 and BAPI_TRANSACTION_COMMIT.
I did read Thomas Jungs weblogs on ABAP and web service. I am aware of two approaches in exposing ABAP functions as web services in WAS 6.20 and 6.40.
My interest is to expose SAP functions as web services, so web service client like .NET can consume the SAP WSDL.
Like Thomas Jungs work, I directly expose Z_BAPI_SALESORDER_CREATE as web service by creating virtual interface and web service definition. After release the web service definition to SOAP runtime and then generate SAP WSDL, I save it at
http://www.netweaver.sba.uwm.edu/linye/xi/Z_BAPI_SALESORDER_CREATE_WSLIN0722.xml. the WSDL works in SAP web service navigator http://sbasap08.sba.uwm.edu:50300/wsnavigator.
However the above SAP WSDL does not work with Microsoft visual studio .NET 2003, SAP web dynpro, and Mindreef SOAPscope 4.1. As for WSDL generated from SAP web service definition, Mindreef SOAPscope 4.1 may not work with it, even if turn off including SAP features when generating WSDL in /nWSADMIN. So Mindreef SOAPscope 4.1 does not work with WSDL like http://sbasap06.sba.uwm.edu:8002/sap/bc/srt/rfc/sap/Z_BAPI_SALESORDER_GETLISTLINWS?sap-client=201&ws....
The analysis tools in SOAPscope suggest that there are some interoperability issues. It reports schema error, not a WSDL operation, Invalid content starting with element wsdl:porttype W062
So the SAP WSDL seems to have some interoperability problem with MS .NET and Mindreef SOAPscope 4.1.
However, from Thomas Jungs weblogs ABAP web services: Logon language processing, I saw Thomas Jung did expose a RFC as web service by creating virtual interface, web service definition, release it to SOAP runtime and generate SAP WSDL. Then in .NET load the SAP WSDL and it works. My question is that how come my SAP WSDL generated from the same process as Thomas Jung did, not work with .NET/Mindreef SOAPscope 4.1?
So is there any patch or fix update can solve the SAP WSDL problem? Is it because my SAP ABAP WAS 6.40 is behind in patch? It might be patch SP6 or something like that.
Thanks,
Lin Thomas Ye
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can tell you that .Net is the primary platform where I consume my Webservices. I have about 20 different webservices being consumed by .Net and have never hit this problem.
I have the porttype section in one of my WSDLs. Perhaps looking at it will help:
<wsdl:portType name="YES_TJUNG_WS_SDN_TEST">
- <wsdl:operation name="ZERfcWsGetSmsResultCds">
<wsdl:input message="tns:ZERfcWsGetSmsResultCds" />
<wsdl:output message="tns:ZERfcWsGetSmsResultCdsResponse" />
</wsdl:operation>
- <wsdl:operation name="ZERfcWsGetStatusWebtel">
<wsdl:input message="tns:ZERfcWsGetStatusWebtel" />
<wsdl:output message="tns:ZERfcWsGetStatusWebtelResponse" />
<wsdl:fault name="exception00" message="tns:exception00" />
</wsdl:operation>
</wsdl:portType>
I can tell you that if you are on 640 SP6, that is quite old. The current SP is 13. 640 was even generally available until SP9.
Sanjeev Singh has very likely given you the correct answer to your question. I just wanted to add that if you are on 640 you might want to consider using the new WebService functionality instead of old 620 stuff. The 640 functional generates a unique endpoint for each released webservice in advance. This provides better security and tracing capabilities.
The following weblog shows the major differences between the two approaches:
/people/thomas.jung3/blog/2004/11/15/bsp-150-a-developer146s-journal-part-xiii-developing-abap-webservices
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
Are you sure function module Z_BAPI_SALESORDER_CREATE is RFC enabled ? Go to Transaction SE37 and display Z_BAPI_SALESORDER_CREATE function module. Check on the "Attribute" tab if "RFC enabled" check box is checked or not.
Cheers,
Sanjeev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.