HelloWorldControl.jcx Sample
This topic inludes the source code for the HelloWorldControl.jcx Sample.
Sample Location
This sample is located in the following directory in your WebLogic Workshop installation:
BEA_HOME/weblogic81/samples/workshop/SamplesApp/WebApp/controls/webservice/helloworld/syncWebService/
Sample Source Code
001 package controls.webservice.helloworld.syncWebService;
002
003 /**
004 * @jc:location http-url="HelloWorld.jws" jms-url="HelloWorld.jws"
005 * @jc:wsdl file="#HelloWorldWsdl"
006 * @editor-info:link autogen-style="java" source="HelloWorld.jws" autogen="true"
007 */
008 public interface HelloWorldControl extends com.bea.control.ControlExtension, com.bea.control.ServiceControl
009 {
010
011 public java.lang.String HelloWorld ();
012
013 static final long serialVersionUID = 1L;
014 }
015
016 /** @common:define name="HelloWorldWsdl" value::
017 <?xml version="1.0" encoding="utf-8"?>
018 <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/" xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.openuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.openuri.org/">
019 <types>
020 <s:schema elementFormDefault="qualified" targetNamespace="http://www.openuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema">
021 <s:element name="HelloWorld">
022 <s:complexType>
023 <s:sequence/>
024 </s:complexType>
025 </s:element>
026 <s:element name="HelloWorldResponse">
027 <s:complexType>
028 <s:sequence>
029 <s:element name="HelloWorldResult" type="s:string" minOccurs="0"/>
030 </s:sequence>
031 </s:complexType>
032 </s:element>
033 <s:element name="string" nillable="true" type="s:string"/>
034 </s:schema>
035
036 </types>
037 <message name="HelloWorldSoapIn">
038 <part name="parameters" element="s0:HelloWorld"/>
039 </message>
040 <message name="HelloWorldSoapOut">
041 <part name="parameters" element="s0:HelloWorldResponse"/>
042 </message>
043 <message name="HelloWorldHttpGetIn"/>
044 <message name="HelloWorldHttpGetOut">
045 <part name="Body" element="s0:string"/>
046 </message>
047 <message name="HelloWorldHttpPostIn"/>
048 <message name="HelloWorldHttpPostOut">
049 <part name="Body" element="s0:string"/>
050 </message>
051 <portType name="HelloWorldSoap">
052 <operation name="HelloWorld">
053 <input message="s0:HelloWorldSoapIn"/>
054 <output message="s0:HelloWorldSoapOut"/>
055 </operation>
056 </portType>
057 <portType name="HelloWorldHttpGet">
058 <operation name="HelloWorld">
059 <input message="s0:HelloWorldHttpGetIn"/>
060 <output message="s0:HelloWorldHttpGetOut"/>
061 </operation>
062 </portType>
063 <portType name="HelloWorldHttpPost">
064 <operation name="HelloWorld">
065 <input message="s0:HelloWorldHttpPostIn"/>
066 <output message="s0:HelloWorldHttpPostOut"/>
067 </operation>
068 </portType>
069 <binding name="HelloWorldSoap" type="s0:HelloWorldSoap">
070 <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
071 <operation name="HelloWorld">
072 <soap:operation soapAction="http://www.openuri.org/HelloWorld" style="document"/>
073 <input>
074 <soap:body use="literal"/>
075 </input>
076 <output>
077 <soap:body use="literal"/>
078 </output>
079 </operation>
080 </binding>
081 <binding name="HelloWorldHttpGet" type="s0:HelloWorldHttpGet">
082 <http:binding verb="GET"/>
083 <operation name="HelloWorld">
084 <http:operation location="/HelloWorld"/>
085 <input>
086 <http:urlEncoded/>
087 </input>
088 <output>
089 <mime:mimeXml part="Body"/>
090 </output>
091 </operation>
092 </binding>
093 <binding name="HelloWorldHttpPost" type="s0:HelloWorldHttpPost">
094 <http:binding verb="POST"/>
095 <operation name="HelloWorld">
096 <http:operation location="/HelloWorld"/>
097 <input>
098 <mime:content type="application/x-www-form-urlencoded"/>
099 </input>
100 <output>
101 <mime:mimeXml part="Body"/>
102 </output>
103 </operation>
104 </binding>
105 <service name="HelloWorld">
106 <port name="HelloWorldSoap" binding="s0:HelloWorldSoap">
107 <soap:address location="http://localhost:7001/controls/webservice/helloworld/HelloWorld.jws"/>
108 </port>
109 <port name="HelloWorldHttpGet" binding="s0:HelloWorldHttpGet">
110 <http:address location="http://localhost:7001/controls/webservice/helloworld/HelloWorld.jws"/>
111 </port>
112 <port name="HelloWorldHttpPost" binding="s0:HelloWorldHttpPost">
113 <http:address location="http://localhost:7001/controls/webservice/helloworld/HelloWorld.jws"/>
114 </port>
115 </service>
116 </definitions>
117 * ::
118 */
|