11.01.2015 Views

Enterprise Application Integration

Enterprise Application Integration

Enterprise Application Integration

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SOAP WSDL WS with .NET WS in Java<br />

Java Client with Dependency Injection<br />

Example: stateless session bean as client of a web service<br />

@Stateless<br />

@Resource(name="service/Adder",<br />

type ="javax.jws.WebService",<br />

mappedName="AdderService")<br />

public class AdderClient implements SomeInterface{<br />

}<br />

public int add(int x, int y){<br />

int[] val = {x,y};<br />

@WebServiceRef(name="java:comp/env/service/Adder")<br />

Adder service;<br />

return service.add(val);}<br />

}<br />

153

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!