cancel
Showing results for 
Search instead for 
Did you mean: 

JAX-WS - Provider api

former_member190457
Contributor
0 Kudos

Hi developers,

I am developing a web service implementation with Provider api (@WebServiceProvider).

In Glassfish the xml config file sun-jaxws must be provided to map the wsdl to the implementing class


<?xml version="1.0" encoding="UTF-8"?>
<endpoints
    xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime"
    version="2.0">
    <endpoint
    name="CardService"
    implementation="com.sun.techtip.cardservice.service.CreditCardServiceUsingMESSAGE" 
    wsdl="WEB-INF/wsdl/CreditCardService.wsdl"
    service="{urn:CardService}CardService"
    port="{urn:CardService}CardServicePort"
    url-pattern="/CardService"/>
</endpoints>

Which file is used on SAP AS EE 5 to do so?

Thanks, regards

Vincenzo

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member190457
Contributor
0 Kudos

Unknown

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi

In SAP NW JEE5 you do not need any additional XML files for the mapping. Let me show an example:

@WebService(name = "DefaultPort", targetNamespace = "http://foo.com/zzz/webservice/")
@SOAPBinding(style = SOAPBinding.Style.RPC, use = SOAPBinding.Use.LITERAL)
public interface TestSimpleParams {
...
}

@WebService(portName="TestSimpleParamsBeanPort", serviceName="TestSimpleParams", targetNamespace = "http://foo.com/zzz/webservice/", endpointInterface="foo.com.TestSimpleParams")
@Stateless
public class TestSimpleParamsBean implements TestSimpleParams {
...
}

WSDL is generated automatically by the Java implementation of a web-service.

BR, Siarhei

former_member190457
Contributor
0 Kudos

Hi Siarhei,

Thanks for your quick reply.

Actually what you say is right, but doesn't apply to my question.

In my scenario I am developing a webservice with outside-in approach (top-down in SAP), starting from WSDL.

Your example starts from Java and generates WSDL.

I want to develop a Provider-API-based endpoint, not a stateless-ejb-based endpoint as in your example.

JAX-WS 2.0 introduces [javax.xml.ws.Provider|https://jax-ws.dev.java.net/nonav/jax-ws-20-pfd/api/javax/xml/ws/Provider.html] interface that is an alternative to a Java service endpoint interface (SEI) based endpoint.

It is used if the services need to work at the XML message level.

Can anyone please shed some light?

Thanks, regards

Vincenzo

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi

Yes, top-down variant is also possible. In SAP NWDI use Import WSDL Wizard. The wizard will generate all necessary classes. After that you should just modify the classes and provide real method implementation.

Sorry If I did not help you

former_member190457
Contributor
0 Kudos

Thanks for your reply,

Yes with NWDS you can do exactly that, but the wizard will create a stateless EJB endpoint.

I would like to create an Outside-in Provider-API-based (NOT ejb) WS endpoint.

How can I do that?

Kind regards

Vincenzo