cancel
Showing results for 
Search instead for 
Did you mean: 

Calling SOAP Web Service in dynpro?

Former Member
0 Kudos

Hello,

I have configured the XI to exchange data from an external soap and exposed its web service through wsdl file. Now I want to call the service in my model for dynpro application but when I define the adaptive web service model it gives me error but returns status code 200.

Can I call the XI service directly using Java Code, I would be thankful if you guide me how establish the dynpro and XI web service communication.

regards,

Jawed Ali

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Use HttpClient to call webservice, search the details on SDN.

Former Member
0 Kudos

Hi Javed,

Yes, you can call webservice directly.

Just provide the correct wsdl url while creating your Web Service Model.

Regards,

Murtuza

Former Member
0 Kudos

Thats what my problem is Murtuza. I have created the adaptive webservice model as I am using latest version of the EP and NWDS. The plain Web service model is now deprecated, so I have to model the XI webservice using adaptive web service model.

The deprecated web service model, used to provide some proxy classes generation mechanism which the new adaptive model doesn't provide. I have tested my XI webservice WSDL file using XML Spy and its giving me correct output but the adaptive webservice model gives me the error, which I described in my first post.

I hope I have cleared my point, if you need any thing else to know let me know.

I created and deployed the web service proxy client and trying to call it using the java code but it also gives me ClassCastException when executing following code to call XI webservice using webservice client proxies:


	InitialContext ctx = new InitialContext();
	Object obj = ctx.lookup("/wsclients/proxies/sap.com/PBWSProxy/com.pso.prototype.PBWSXIProxy");
	sResult = obj.getClass().toString();
		
	MI_CHK_ACC_OUTService service = (MI_CHK_ACC_OUTService) obj;
	MI_CHK_ACC_OUT stub = (MI_CHK_ACC_OUT)service.getLogicalPort();
	stub._setProperty("javax.xml.rpc.security.auth.username", "pisuper");
	stub._setProperty("javax.xml.rpc.security.auth.password", "lotus123");
	sResult=stub.MI_CHK_ACC_OUT("0000104851", "1100");			

line:

<b>MI_CHK_ACC_OUTService service = (MI_CHK_ACC_OUTService)</b> obj;, throwing exception after debuggin I found MI_CHK_ACC_OUTServiceImpl file the code is looking for but I don't have any definition for this class, as the proxy I created doesn't provide any such class. Any idea from where I can find the class definition for MI_CHK_ACC_OUTServiceImpl?