cancel
Showing results for 
Search instead for 
Did you mean: 

consuming a web service from a BSP page

Former Member
0 Kudos

Hello

Here is the description of the different instances :

ERP is running on an instance without J2EE engine

EP is running on an instance with J2EE engine

I create a web service definition, VI, and proxy classe on ERP.

I tested the web service using WSADMIN where I put as J2EE server the J2EE engine on the EP instance : it works.

I created a BSP application to consume the web service, when I try to reach the web service I've the error Unallowed RFC-XML Tag (SOAP_EINVALDOC) .

I guess it doesn't work because I ve got no J2EE engine linked to my ERP system, but as the netweaver plateform is new for us my question is : How can I define in ERP that I use the J2EE engine from EP ?

Thanks

Accepted Solutions (0)

Answers (3)

Answers (3)

athavanraja
Active Contributor
0 Kudos

need some clarification.

<i>create a web service definition, VI, and proxy classe on ERP.</i>

I guess its on the ABAP stack? is it right?

<i>I created a BSP application to consume the web service, when I try to reach the web service I've the error Unallowed RFC-XML Tag (SOAP_EINVALDOC) .</i>

since you are trying the consume the webservice in BSP application, you dont need the J2EE engine.

Are you on WAS6.40? if yes simply create a client proxy for the webservice using the webservice WSDL and use the client proxy in your BSP.

Regards

Raja

Former Member
0 Kudos

Hi Raja

Yes it's on the Abap stack, I createthe client proxy and used the client proxy in my BSP :

try.

create object availabilityCheck.

call method availabilityCheck->material_availability

EXPORTING

input = wsInput

IMPORTING

output = wsOutput.

catch cx_ai_system_fault into wsException.

errorMsg = wsException->errorText.

endtry.

And I've got the error, we are in WAS 6.40 but without J2EE engine.

Any special requirement when I create the client proxy ???

Xavier

athavanraja
Active Contributor
0 Kudos

as i mentioned previously not need for J2EE engine.

since the client proxy generated handles passing SOAP message and getting result back, it looks like wrong tag is rendered by the underlying std. code. probably a search in OSS might help. i will also search is there any OSS for this.

but i dont see the reason why you have to go for webservice model as both the BSP application and the Webservice are in the same system and your webservice should be based on a RFC FM. You could simply call the RFC in your BSP. (hope i didnt misunderstand your question)

Regards

Raja

Former Member
0 Kudos

Hi Raja

It is for the moment just a prototype to test webservice in ABAP stack, in the futur the webservice will be call from the portal ...

eddy_declercq
Active Contributor
0 Kudos

Hi,

Pls don't forget to reward points and close the question if you find the answers useful.

Eddy

Former Member
0 Kudos

Hi Eddy

As soon as I got the right answer I will attribute points, but for the moment I still have the same error.

If you want to test, simply create a web service from BAPI_MATERIAL_AVAILABILITY and test the client proxy generated by SAP:

You will have an error in CL_SOAP_XP~XP_READ_TAG method returned by :

call 'XRfcConverter'

id 'METHOD' field tsxp_xp_read_tag

id '%_XP_REF' field my_xp_ref

id 'XMLTAG' field my_tag.

No idea for 10 points ?

Xavier

Former Member
0 Kudos

hi

in your wsdl file find this

tag

<wsdl:service name="SendSMS">

inside it

you have a tag for soap port like this

<wsdl:port name="SendSMSSoap" binding="tns:SendSMSSoap">

<soap:address location="http://localhost/<Web service path>" />

</wsdl:port>

<wsdl:port name="SendSMSHttpGet" binding="tns:SendSMSHttpGet">

<http:address location="http://localhost/<Web service path>" />

</wsdl:port>

<wsdl:port name="SendSMSHttpPost" binding="tns:SendSMSHttpPost">

<http:address location="http://localhost/<Web service path>" />

</wsdl:port>

here replace localhost with the address of the server where the web service lies

like i mentioned

<server ip>

i hope this will work out

regards

Former Member
0 Kudos

For this you have to put your web service on the same server where your BSP application lies. this way the local host address will get resolved easily

else you have to define the complete path i.e

<ip address>:port

moreover refer to this thread

regards

Former Member
0 Kudos

The J2ee engine is not on the R/3 instance where I ve got my BSP application.

So if I read your answer I'm in the ELSE : Wich path to you talk ?

I already have a look on the thread you mention, but the error has the same label but I m not with the same configuration

Former Member
0 Kudos

i too faced the same problem but in my case it was web service on .net platform.

hence i configured it .

now, are you able to call that web service from some other system (other than where it lies)

like a simple web application a web service can also be called from other system by giving

<ip>:port/application(or service)

if you are able to call this way, the web service on the server where bsp lies then simply in your soap request give this address in

call method cl_http_client=>create_by_url.

ref. this method 1st for above class

/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap

if you are developing using proxy.

then i am not sure, you have to edit the address on the logical port(lpconfig) for calling method

regards,

eddy_declercq
Active Contributor
0 Kudos

Hi,

Maybe this thread might be helpful:

Eddy