You are on page 1of 26

Web Services

Web Services

SAP J2EE Engine 6.20

Web Services

Contents
1. Introduction to Web Services ............................................................3 SOAP ..............................................................................................3 WSDL..............................................................................................3 UDDI ..............................................................................................3 2. Overview of the Web Services Toolkit ................................................4 3. Features ..........................................................................................5 4. Setting up Web Service Framework ...................................................6 5. Enabling and Disabling SOAP Support ................................................7 6. Server Side - Service Endpoints .........................................................8 6.1. Session Beans ...........................................................................8 6.2. JMS Destinations .....................................................................13 7. Client Side – Accessing Services ......................................................14 7.1. SAP J2EE Engine SOAP Proxy Generator ...................................14 8. UDDI4J Pluggability ........................................................................16 9. WSIL Integration............................................................................17 10. DataMarshalers ............................................................................18 11. Examples .....................................................................................22 Example 1 – Calculator...................................................................22 Example 2 – Simple .......................................................................23 Example 3 – Complex1...................................................................23 Example 4 – Complex2...................................................................23 Example 5 – EchoServlet ................................................................24 Example 6 – UDDI4J ......................................................................24 12. References ...................................................................................25

2/26

For more information about this topic and the matters presented below. In addition the WSDL describes the operations (methods) that the particular Web Service exposes and how and where to access them. SOAP SOAP (Simple Object Access Protocol) is an XML-based protocol.Web Services 1. see the drafts released by the W3C organization. The interaction between Web Services and business applications is simple and productive. These services (or businesses) are stored in UDDI repositories and can be accessed through a particular client (web browser). secure and efficient bussines-to-bussines communications imposes Web Services as a main technology. make it an excellent choice for exchanging information over the Internet. which is developed to allow network communication between different applications via the World Wide Web. 3/26 . Introduction to Web Services The growing need of fast. WSDL WSDL (Web Service Description Language) is the primary means for describing Web Services. Discovery and Integration) is a new technology that allows services and businesses to be published in the Internet. The request is then processed by the service and the response is sent back to the application. It is based on XML and is used to define Web Services. The application sends a request to a service at a specified URL. A short résumé of additional technologies related to Web Services is given below. Its language and platform independence along with the opportunity to run over HTTP. Web services are offered via the Internet as they use an XML-based communication protocol (SOAP). UDDI UDDI (Universal Description.

Using the new features and tools one can easily use Web service technologies either on the client or on the server sides. 4/26 .Web Services 2. Overview of the Web Services Toolkit The Web services toolkit provides a framework for handling the emerging Web service issues. This document will provide information for the following topics: • • • • • Overview of the supported by the framework features Setting up the SAP J2EE Engine Using Enterprise Java Beans as Web service endpoints Configuration of a Web service Client side proxy generation For more detailed information about Web services concepts and technologies refer to JSR 109.

2 o JAXM 1. This page will be changed in the future in order to be up-to-date with any new features added.7 Any session bean as Web service SOAP headers on client and server side Configurable WSDL generation on server side Proxy generation on client side UDDI4J pluggability SOAP 1.Web Services 3.1 + attachments support Web Services Inspection Language (WSIL) • • • • • • • 5/26 . • Full implementation of Sun’s Java XML Pack Winter 01 o JAXP 1.0 o JAX-RPC 0.6 o JAXR 0. Features Here is an outline of the standards supported by the framework.

Setting up Web Service Framework In http://localhost/soapdispatcher in your browser. enter 6/26 . order to access the Web service framework.Web Services 4.

To disable it.services.server. restart the server.SoapServlet</servletclass> </servlet> and <servlet-mapping> <servlet-name>soapdispatcher</servlet-name> <url-pattern>/soapdispatcher/*</url-pattern> </servlet-mapping> In order for the changes to take effect.xml file in order to activate the SOAP Support.servlets_jsp.xml file: <servlet> <servlet-name>soapdispatcher</servlet-name> <servletclass>com.inqmy. By default the SOAP Support is enabled. Enabling and Disabling SOAP Support You can enable and disable the SOAP Support of SAP J2EE Engine 6.xml file located in <SAPj2eeEngine_install_dir>/cluster/server/services/servlet_jsp or <SAPj2eeEngine_install_dir>/alone/services/servlet_jsp directory.Web Services 5. Add the above tags in the global-web. remove the following tags from the global-web. In this case a restart of the server is also required.20 through the global-web. 7/26 .

After deploying it. Clicking on it will generate a WSDL.lang.1. This topic will be covered later. Int. SAP J2EE Engine SOAP Proxy Generator” section. for a bean named “Calc”. Float. • 8/26 . Short. java. Server Side .1. which allows serialization or nonserialization and correct WSDL generation for any user class. General Session beans are the preferred kind of J2EE component for an implementation of a Web service. Character. which do not have any DataMarshaler associated. along with their wrapper classes . double.1. For more information.String Arrays of any value and dimension Java Bean Styled objects – These are classes. For example: http://localhost/soapdispatcher?WSDL=Calc.byte.Byte. char. Double. Boolean. short.Service Endpoints 6. Using the Web service framework you can use any existing session bean as a Web service. long. int. and browse through the deployed beans until you find the right one. For all kinds of classes. Using the Web service framework. or get() or set() methods. you just have to go to http://localhost/soapdispatcher.Web Services 6. see “7. which do not fall into these categories. Another way of getting the WSDL is by loading directly: http://localhost/soapdispatcher?WSDL=<beanName>. there is a DataMarshaling framework. To expose a bean as a Web service. which only meaningful parameters are either public variables. any session bean can be easily transformed into a Web service (and for simple ones you will not have to write a line of code). which can be used to access that bean. by providing user DataMarshalers.1. it must be deployed. In order to access a particular bean you can use the generated proxy from the bean’s WSDL. By default the framework can automatically handle the following types: • • • • All Java simple types . The generation of the proxy is executed by the ProxyGenerator. Session Beans 6. float. By default this is used to handle all kinds of special objects. boolean. Long.

PortTypeName := AppName + “Interface” o Operation. BindingName := AppName + “SOAPHTTPBinding” Headers – If the method needs to have some Request or Response header entries in the definition. A list of the rules used to generate the names of the elements in the WSDL definitions is provided below. Each exception has a specific message. • • • 9/26 . You must use the MarshalDescription.xml. WSDL Generation The rules for generation of WSDL definitions of a bean follow the concepts lined out in the JAX-RPC specification. • • • • AppName := <ApplicationName> | MD:<soap-name>.2. In the following description MD:<xxx> means – the content of the tag <xxx> in the MarshalDesctiptor. When the Schema for complex types is generated.xml.Name := <MethodName> o Operation. each complex type has either the classname of the type.1. If the default naming is not correct for some application there is a way to change the behavior of the WSDL generator. or a mapping specified in the MarshalDescriptor – <name-mapping> tags for each bean. MessageNames o MethodMessages := AppName + <MethodName> + “_” + (“Request” | “Response”) PartName := (“P” + <ParameterIndex>) | MD:<param>.Output := <MethodName> + “Response” o Operation. and their type is the type of the header. This will be covered next. the type is the type of the specified exception message.Fault := <ExceptionName>.Input := <MethodName> + “Request” o Operation. o Header Messages := <MethodName> + (“_RequestHeaders” | “_ResponseHeaders”) The names of the “part” elements are the names of the headers. o ExceptionMessages := <ExceptionName> + “Message” ExceptionMessages have only one part named “errorMessage”.Web Services 6. of type “xs:string”. The default rules can be overloaded by an entry in the MarshalDescriptor.

1.3. It must be named “MarshalDescription. and is valid for all the beans in the application.xml”.w3.org/2001/XMLSchema"> <xs:element name="marshal-descriptor" type="marshalDescriptorType"/> <xs:complexType name="marshalDescriptorType"> <xs:sequence> <xs:element name="bean" type="beanType" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="data-marshaler" type="dataMarshalerType" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> <xs:complexType name="beanType"> <xs:sequence> <xs:element name="soap-name" type="xs:string" minOccurs="0"/> <xs:element name="method-descriptor" type="methodType" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="name-mapping" type="extensibleClassNameMappingType" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="class" type="xs:string" use="required"/> </xs:complexType> <xs:complexType name="methodType"> <xs:sequence> <xs:element name="soapAction" type="xs:string" minOccurs="0"/> <xs:element name="request-header" type="methodHeaderType" minOccures="0" maxOccurs="unbounded"/> <xs:element name="response-header" type="methodHeaderType" minOccures="0" maxOccurs="unbounded"/> <xs:element name="param" type="paramType" maxOccurs="unbounded" minOccurs='1'/> </xs:sequence> <xs:attribute name="method" type="xs:string" use="required"/> </xs:complexType> <xs:complexType name="methodHeaderType"> <xs:all> <xs:element name="header-name" type="xs:string"/> <xs:element name="header-type" type="xs:string"/> </xs:all> <xs:attribute name="isRequired" type="xs:boolean"/> </xs:complexType> 10/26 .Web Services 6. It must be located in the root directory of exactly one JAR inside an EAR. used to specify additional configuration needed for generation of the WSDL or runtime of a Web service. Marshal Description This is an XML file. This is the Schema definition of this XML file: <xs:schema xmlns:xs="http://www.

<request-header>. Then several <bean> and several <data-marshaler> tags might follow. There are three types of descendant elements <soap-name>.each of these tags specifies a mapping for the name of a method parameter. which will be used when generating the WSDL. which is required or allowed in the SOAP request. .this element allows you to specify additional options for each method.Web Services <xs:complexType name="paramType"> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="type" type="xs:string" use="required"/> </xs:complexType> <xs:complexType name="extensibleClassNameMappingType"> <xs:all> <xs:element name="java-name" type="xs:string"/> <xs:element name="wsdl-name" type="xs:string"/> </xs:all> </xs:complexType> <xs:complexType name="dataMarshalerType"> <xs:all> <xs:element name="create-method" type="xs:string"/> <xs:element name="marshaler-classname" type="xs:string"/> <xs:element name="marshaled-class" type="xs:string"/> </xs:all> </xs:complexType> </xs:schema> Each Marshal descriptor starts with a <marshal-desriptor> tag.describes one specific bean of the application. The method name is specified by the “method” attribute. To specify the bean. Further you should set the <header-name> and <header-type> elements. instead of the name of the bean. Currently only headers of type String and int are supported.each element specifies a header. whether to set the required attribute on the soap:header or not. Since there is no way to take the names of the parameters using 11/26 . <method-descriptor> . Using the “isRequired” attribute you might specify. The “class” specifies the RemoteInterface class. <request-header> <response-header> . This element specifies headers.similarly to the <request-header> element. <response-header> and <param>. . which could be returned by the service. and you want in the WSDL.specifies the name. <method-descriptor> and <type-mapping>. These include . <param> . both the “name” and “class” attributes must be supplied. <bean> <soap-name> . you should use this tag. If the bean is “ExampleBean”. ExampleWebService to be displayed.

txt – you will have to add two entries to this configuration file: o reference <appName> library:webservices o reference SOAPDispatcherServlet The bean implementation.Web Services Java Reflection. in the correct order. By default. 6.4. <name-mapping> . If the WSDL needs to be independent of the implementation. you have to extend com. and the Java type of the parameter.headers. The <param> element has two descendants – the new name. which extends SOAPSessionBean. or get Response headers. which name is the class name of the Java type.this element is used to overload the default naming of complex types generated in the <definition> element of the WSDL. To enable your bean to receive or send SOAP headers along with the Response. you must perform three tasks: • • • RemoteInterface – Instead of extending EJBObject. by default their names are mapped like “p0”.inqmy.soap. derived from SOAPSessionBean: • • public Hashtable getRequestHeaders() throws RemoteException public Hashtable getResponseHeaders() throws RemoteException public Object getRequestHeader(String name) throws RemoteException public Object getResponseHeader(String name) throws RemoteException public void setRequestHeader(String name. The latter on the other hand should extend EJBObject. it creates a complex Schema type. when the WSDL generator encounters some complex Java type. you must use a name mapping.headers. “p1”. Soap Headers – Server Side A short explanation of how to design your session bean to use SOAP headers will be presented. you have to implement com.lib. … and so on. Object value) throws RemoteException • • • 12/26 . If you would like to perform an overload.SOAPHeadersInterface.txt or <SAPj2eeEngine_install_dir>/cluster/server/managers/reference. Session bean class – Instead of implementing SessionBean.SOAPSessionBean <SAPj2eeEngine_install_dir>/alone/managers/reference. you have to specify a <param> element for each of the parameters in the method signature.1. The Java type is required in order to distinguish the methods when there are overloaded methods.soap. includes the following methods. Later in the topic will be explained how to use the generated proxy to set Request.inqmy.lib.

String factor. String fdetail. When the SOAPDispatcher catches such an exception. Then in the generated proxy. String factor. and generates a proper soap:fault response. and get or set them. to help us clarify the architectural questions. fault:code. fault:string and fault:detail using WSDL. Both kinds of connections are under development. public SOAPFaultException(String fcode. which you might throw in your methods com. 13/26 .1.jaxm. Object value) throws RemoteException Using them you can access the headers. JMS Destinations Currently we are working of a way to allow the Web service endpoint to be a JMS destination. where the Service Requestor publishes the requests to a JMS destination and takes the responses from there. The other possibility is the SOAP/JMS Binding.5.Web Services • public void setResponseHeader(String name. there is a special kind of exception.SOAPFaultException. will not be informed that its request was sent through JMS. Throwable t). String fstring. 6.inqmy.2. 6. which will route them to the JMS destination. you might catch this exception (it is the same class) and check the proper fields. please feel free to send an email. it reads the special fields. String fdetail).lib. If you have any questions or request. String fstring. So the Service Requestor. Soap Faults Since there is no standard way to specify the fault:actor. which will be accessed though SOAP/HTTP Binding. The available constructors are: • • public SOAPFaultException(String fcode.soap. the requests will go to the SOAPDispatcher. That is.

The class of the ProxyGenerator is com.1.jar lib/inqmysoap.Web Services 7. Usage This is the first. which is then processed by the client. which is sent to the server. This SOAP message contains the result of the bean's method invocation on the server side. located <SAPj2eeEngine_install_dir>/cluster/server/additional-lib/ or in <SAPj2eeEngine_install_dir>/alone/additional-lib/ directory. SAP J2EE Engine SOAP Proxy Generator 7. There are a number of options.inqmy.wsdl.jar. which allow you to customize the SOAP Request.jar.jar.1.mail. inqmysoap. which the server returns is again a SOAP message. The SOAP message is processed and the bean’s method is invoked. Client Side – Accessing Services ProxyGenerator provides an easy way to access a Web service using the Web services toolkit. and currently the most reliable way to use proxies on the client side.1.lib.inqmy. The ProxyGenerator handles this task.wsdl.ProxyGenerator. since not all SOAP servers available now on the market have full SOAP 1. for a specific server.jar.lib.jar file. It is located in <SAPj2eeEngine_install_dir>/cluster/server/additionalor <SAPj2eeEngine_install_dir>/alone/additionallib/inqmysoap.1 support. There is also a way to handle SOAP headers in the SOAPRequest and SOAPResponse. the proxy from the bean’s WSDL must be generated. Invoking a proxy method generates a SOAP message. activation. 7. In addition the following JAR files must be included in your classpath . If you want to access the bean. The result. You need also the inqmy-lib. An example clarifying these issues is given below: java –cp <absolute_jarfiles_path> com.jar file in <SAPj2eeEngine_install_dir>/cluster/server/lib/ or <SAPj2eeEngine_install_dir>/alone/lib/ directory in order to run the generator.ProxyGenerator <wsdl_file> <proxy_output_directory> [options] where: 14/26 . inqmyxml.

specifies the full path the required JAR files.3. <wsdl_file> . The returned class has to be casted to the port class.1. Generated Stuff wsdl:service – for the wsdl:service tag a class is generated.1. specified jarname and includes When generating the proxy classes.getPort(“Calc”). Advanced Features 7.lib.the WSDL file. <proxy_output_directory> .2.inqmy.base. Setting HTTP Proxy 7.the directory where the proxy files will be generated. A list of the available options follows: • • • [-p package] – name of the package. 7. the following WSDL to Java is used (the same as described in JAX-RPC 0. wsdl:operation – for each operation of this port.1.1. for which a proxy will be generated. wsdl:port – for each port in the service a class is generated.ProxyPortBaseSOAP getPort(String name) which returns the port associated with this name.3.creates JAR file with the the compiled proxy files in it.1. Using SOAP Headers 15/26 . This class has a method: public com. Changing Namespace Modes 7. having the same name as the “name” attribute of the service tag. For example Calc calcPort = (Calc)calcService. [-c] – compile the generated files. which has the same name as it is in the “name” attribute of the wsdl:port tag.3.7): 7. [-j jarname] . a method in the port class is generated having the same name and signature as described in the input and output messages. Later in this document the mapping between Schema types and Java types will be described.wsdl.1.Web Services • • • <absolute_jarfiles_path> .2.3.3.

TransportClassName=com.Web Services 8.jar o inqmysoap.jar 16/26 . In order to perform this task.inqmy. you must set as system property the following: org.jar o jnet.jar o mail.uddi4j.jar HTTPS support (Required by the Publish API) o jsse.uddi4j.jar o jaxm. UDDI4J Pluggability The SAP J2EE Engine Web services framework can be also plugged as a transport protocol into the IBM UDDI4J implementation.InQMySOAPT ransport (for UDDI4J v2) and include the following classes in your classpath: • • • Web services framework o inqmyxml.soap.lib.jar Generic libraries o activation.

wsil. which allows inspecting the Web services hosted by a server. 17/26 .Web Services 9. The WSIL port of the SAP J2EE Engine is: http://<server-addr>/soapdispatcher/inspection. WSIL Integration Web Services Inspection Language (WSIL) is an xml-based protocol.

a DataMarshaler is searched and after that the getDataFieldList() method is invoked to see what DataFields are needed by this DataMarshaler. DataMarshalers Let’s consider the following example of a class and a method. to return an instance. to return a list of DataFields.xml (which associates the DataMarshaler classes with user classes).Web Services 10. The DataMarshaler also cares for instantiating new objects using the data received. which describe the object. or using an instance to return the fields.b = b. using this class: public class A implements Serializable { private int b. public int getB() { return b.and in the bean the following method is included: public String readA(A a). and give an instance of the class A to the method. In this way you only need to write a simple class specifying what kind DataFields you wish to expose and then using this DataFields.txt or in the form: reference <app_name> library:webservices <SAPj2eeEngine_install_dir>/cluster/server/managers/reference. and using an object. For each user class. } } -. There is no way for the framework to be informed exactly which methods to call in order to set the variable b. the framework can easily find out what kind of data should be transferred in order to get all the information from a user object. In this case DataMarshaler is used.txt an entry 18/26 . The DataMarshaler is also used during the generation of the WSDL definition of the bean. } public void setB(int b) { this. Introduction to DataMarshalers The idea is that using a DataMarshaler and a MarshalDescription. Note: If your application uses DataMarshalers you must add in the <SAPj2eeEngine_install_dir>/alone/managers/reference. Then these fields are recursively described in the WSDL.

when generating the WSDL of the service in order to describe what kind of objects must be supplied to the framework. which knows DataMarshaler instance of DataMarshaler getDataFieldList() : DataFieldList unmarshal(DataFieldList. a dataClass. Class dataClass) reuse(String name. Also with a specified instance – what fields to expose. The DataField object holds information for exactly one data field of the class. SOAPContext) : DataFieldList DataFieldList DataFieldList(String className) add(DataField) add(int index. boolean isUbounded) reuse(Object data) getName() : String getDataClass() : Class getData() : Object ubounded() : boolean Usage of the methods of DataMarshaler class is explained below: • DataFieldList getDataFieldList() – this method must return a DataFieldList. 19/26 . A DataFieldList object consists of several DataField objects. DataField) item(int index) : DataField remove(int index) size() : int clear() * 1 name : String dataClass : Class data : Object isUnbounded : boolean DataField DataField(String name. A is a class. SOAPContext) : Object marshal(Object. which consists of the DataFields the user wants to expose.Web Services Usage In order to support such user classes several classes and interfaces are defined. Only the name and the dataClass should be initialized – this method is used. and a value – an instance of the data class. Class dataClass) DataField(String name. It has a name. Class dataClass. Class dataClass. boolean isUbounded) reuse(String name. The Marshaling framework uses DataFieldList objects to hold the data. exactly what data is needed in order to produce a specific class.

xml file. where xxx is the name of the parameter to be used in message and port type generation and yyy is their type.xml can also include additional information about the WSDL generation. which you want to be used instead of the remote class’s name. If any of this parameters is not correct then it is used p0. this file must be in exactly one JAR. If your you must include this class to your bean. order and type. and his descendants <soapname> and <method–descriptor class=”xxx” method=”yyy”> contain this information. If <method-descriptor> is present his descendant must correctly describe the method’s parameter number. identifies the method. in the root directory of the bean’s JAR file. Neither of them is required. Object unmarshal(DataFieldList. This tag has as many descendants as method’s parameters. The descendants have the following form: <param name=”xxx” type=”yyy”>. The <method–descriptor class=”xxx” method=”yyy”>. where xxx is the name of the class from which WSDL is generated and yyy is his method. SOAPContext) – this method is invoked by the framework. with DataFields of type and order exactly as returned by the getDataFieldList() method. If any of them is omitted. the standard way of creating names (according to JSR-109) is used.Web Services • • – this method is used when the framework needs to create an instance of a user class and use it. which has the same DataFields in the same order as they were provided by the getDataFieldList() method. Now the objects carried by the DataFields are actually instances. and return it to the framework. when a user object needs to be converted to XML data. The MarshalDescription. 20/26 . p1 … as parameters names (order respectively) and no exception will be thrown. where xxx is the name of the bean. SOAPContext) Now MarshalDescription. The <soapname> encloses the name. The tag <bean name=”xxx”>. The framework provides a fully initialized DataFieldList object. The user must use these objects to create an instance of the marshaled class. and create a application has several beans. The user must use the provided Object and return a DataFieldList. DataFieldList marshal(Object data. It describes what DataMarshalers are provided by the user and for which classes.

Web Services MarshalDescription.xml <marshal-descriptor> <bean name="calculator"> <soapname>tester</soapname> <method-descriptor class="mycal.calRemote" method="add"> <param name="first" type="float"/> <param name="second" type="float"/> </method-descriptor> </bean> <data-marshaler> <marshaler-classname>ADataMarshaler</marshaler-classname> <marshaled-class>A</marshaled-class> </data-marshaler> <data-marshaler> <marshaler-classname>BDataMarshaler</marshaler-classname> <marshaled-class>B</marshaled-class> </data-marshaler> </marshal-descriptor> marshal-desctiption 1 * data-marshaler marshaler-classname : String marshaled-class : String 21/26 .

5.java Calculator/Client/source/CalcService/CalcServiceTester.1. It uses the generated proxy to call bean’s methods.Web Services 11.an application.ear Calculator/Server/source/*. see “7. 2. 3. The following procedure will show the process of deploying the bean as a Web service.java none http://localhost/soapdispatcher?WSDL=Calc 22/26 . Location Source Client Proxy Client Tester reference. 4. which is also shipped with the SAP J2EE Engine.txt line WSDL Calculator/Server/calc. generating the WSDL. SAP J2EE Engine SOAP Proxy Generator”.java. It is just an Enterprise Java Bean. see the table below. supplied with the distribution. Run the CalcServiceTester. This issue is covered in “4. Examples This section will provide a short guide to the examples. For additional information about the WSDL. Use the Web services framework to access the deployed bean. Browse to save the WSDL in the desired directory. The whole process is handled by the framework automatically.ear file using the DEPLOY shell command or the Deploy Tool coming with the installation. Setting up Web Service Framework” section of this document. Use the ProxyGenerator Tool to generate a proxy from the WSDL file. For more information. Deploy the calc. generating proxy and calling the proxy methods: 1. Example 1 – Calculator This is the simplest example provided .* Calculator/Client/source/CalcService/CalcService. The examples can be found in <SAPj2eeEngine_install_dir>/docs/examples/WebServices/soap/ directory. which has several methods for doing simple calculations on float numbers.

txt file.ear Complex1/Server/source/*. Also two DataMarshalers are provided.txt or <SAPj2eeEngine_install_dir>/cluster/server/managers/reference. etc.txt line WSDL Simple/Server/simple.txt or <SAPj2eeEngine_install_dir>/cluster/server/managers/reference. In order to deploy and run this example you must add the line specified in the table below to the <SAPj2eeEngine_install_dir>/alone/managers/reference. Location Source Client Proxy Client Tester reference. the one used by the other. 23/26 . The EJBean takes one class.txt line WSDL Complex1/Server/complex1. Again you must add an additional line to <SAPj2eeEngine_install_dir>/alone/managers/reference. But it uses several Java simple types. It uses two user classes. but this time using the provided DataMarshaler.txt.* reference Complex1 library:webservices http://localhost/soapdispatcher?WSDL=Complex1Bean Example 4 – Complex2 This is the most complex example provided.* none http://localhost/soapdispatcher?WSDL=SimpleBean Example 3 – Complex1 This example shows a very simple use of DataMarshalers.Web Services Example 2 – Simple This example also is handled fully by the framework. Also arrays are internally supported. as well as simple types wrapper classes like Integer. Short. so that the server can find the classes. Again the framework handles the WSDL generation. and the DataMarshaler handles this class. which is specified in the providing table. Location Source Client Proxy Client Tester reference.ear Simple/Server/source/*.

Before running them you must perform the steps required to set up the UDDI4J package to work with SAP J2EE Engine. because it is part of the inqmysoap.mail.Web Services Location Source Client Proxy Client Tester reference. For more information see “8.txt line WSDL Complex2/Server/complex2. These files are located in <SAPj2eeEngine_install_dir>/cluster/server/additional-lib/ or <SAPj2eeEngine_install_dir>/alone/additional-lib/ directory.jar file.jar.jar file in your classpath. In addition keep in mind that the corresponding line in the table below must be added in <SAPj2eeEngine_install_dir>/alone/managers/reference.txt line EchoServlet/Server/echo.activation.* reference Complex2 library:webservices http://localhost/soapdispatcher?WSDL=Complex2Bean Example 5 – EchoServlet This example shows the usage of JAXMServlet to receive SOAPMessages in a servlet and to return responses.txt or <SAPj2eeEngine_install_dir>/cluster/server/managers/reference.jar.jnet. Location Source Client Tester reference.inqmysoap. It is not necessary to include jaxm. UDDI4J Pluggability” section.ear EchoServlet/Server/EchoServlet.txt file.jar.inqmyxml.jsse.jar.java reference Echo library:webservices Example 6 – UDDI4J The folder <SAPj2eeEngine_install_dir>/docs/examples/WebServices/soap/uddi4j/ contains several examples taken from the IBM UDDI Package.ear Complex2/Server/source/*. In order to run the example the following JAR files must be added to your classpath .jar. 24/26 .jar.java EchoServlet/Client/EchoServletCaller.

Java API for XML Parsing . 6 October 2000. Andrew Layman. Dave Winer.uddi4j. M. Thompson. 2 May 2001. Tim Bray.) 6.w3.sun.org/TR/1999/REC-xml-names-19990114/.org/TR/2001/WD-soap12-part220011002/. W3C Working Draft "SOAP Version 1. 25/26 . W3C Recommendation "XML Schema Part 1: Structures". 8 May 2000. W3C Note "Simple Object Access Protocol (SOAP) 1. Henry S. Henrik Nielsen.) 3.) 8. Satish Thatte. Jean Paoli. Andrew Layman.w3.w3. C.com/xml/jaxp/index. References 1.1". Marc Hadley. 2 May 2001.org/aboutJava/communityprocess/first/jsr101/ API for XML Based RPC (JAXRPC) v0. Eve Maler.2 Part 1: Messaging Framework".Web Services 12.org/TR/SOAP/. 2 October 2001 (See http://www.html/. Sperberg-McQueen.5 - 9. W3C Recommendation "Extensible Markup Language (XML) 1. Biron.org/TR/2001/RECxmlschema-2-20010502/. W3C Recommendation "XML Schema Part 2: Datatypes". (See http://www. Murray Maloney.0 (Second Edition)".org/TR/2001/REC-xmlschema-120010502/. Dave Hollander. Henrik Frystyk Nielsen.org/. Henrik Frystyk Nielsen.) 5. 2 October 2001 (See http://www. David Ehnebuske. UDDI4J – IBM’s UDDI Implementation – http://www. W3C Recommendation "Namespaces in XML". W3C Working Draft "SOAP Version 1. Don Box.w3. (See http://www. Jean-Jacques Moreau. 10. Noah Mendelsohn. (See http://www. (See http://www. 14 January 1999. Paul V. Martin Gudgin.) 4. Marc Hadley.org/TR/2001/WDsoap12-part1-20011002/. Ashok Malhotra.) 2. Jean-Jacques Moreau. Java http://jcp.w3.w3. Martin Gudgin. (See http://www.) 7. Tim Bray. David Beech. Noah Mendelsohn.org/TR/2000/REC-xml20001006/.w3.2 Part 2: Adjuncts".http://java. Gopal Kakivaya.

Public Review Draft 2: 11/13/2001 .94 - http://java. Java http://www. API for Services Definition XML Language 1.com/xml/jaxr/index.w3. Java API for XML Registries 0.html.sun.7 (JAXR). 26/26 . Messaging 13.1 (Note) 0.com/xml/jaxm/index.org/TR/wsdl.Web Services 11. Web 12.sun.http://java.html.