MyCompanyControl.jcx Sample

This topic inludes the source code for the MyCompanyControl.jcx Sample.

Sample Location

This sample is located in the following directory in your WebLogic Workshop installation:

BEA_HOME/weblogic81/samples/workshop/SamplesApp/WebServices/security/wsse/reqResp/client/

Sample Source Code


001 package security.wsse.reqResp.client;
002 
003 /**
004  * @jc:location http-url="http://localhost:7001/WebServices/security/wsse/reqResp/mycompany/MyCompany.jws"
005  * @jc:wsdl file="#MyCompanyWsdl"
006  * @jc:ws-security-service file="MyCompanyControlPolicy.wsse"
007  */
008 public interface MyCompanyControl extends com.bea.control.ControlExtension, com.bea.control.ServiceControl
009 {
010     
011     public java.lang.String hello ();
012 
013     static final long serialVersionUID = 1L;
014 }
015 
016 /** @common:define name="MyCompanyWsdl" value::
017     <?xml version="1.0" encoding="utf-8"?>
018     <!-- @editor-info:link autogen="true" source="MyCompany.jws" -->
019     <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://workshop.bea.com/MyCompany" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://workshop.bea.com/MyCompany">
020       <types>
021         <s:schema elementFormDefault="qualified" targetNamespace="http://workshop.bea.com/MyCompany" xmlns:s="http://www.w3.org/2001/XMLSchema">
022           <s:element name="hello">
023             <s:complexType>
024               <s:sequence/>
025             </s:complexType>
026           </s:element>
027           <s:element name="helloResponse">
028             <s:complexType>
029               <s:sequence>
030                 <s:element name="helloResult" type="s:string" minOccurs="0"/>
031               </s:sequence>
032             </s:complexType>
033           </s:element>
034           <s:element name="string" nillable="true" type="s:string"/>
035         </s:schema>
036     
037       </types>
038       <message name="helloSoapIn">
039         <part name="parameters" element="s0:hello"/>
040       </message>
041       <message name="helloSoapOut">
042         <part name="parameters" element="s0:helloResponse"/>
043       </message>
044       <message name="helloHttpGetIn"/>
045       <message name="helloHttpGetOut">
046         <part name="Body" element="s0:string"/>
047       </message>
048       <message name="helloHttpPostIn"/>
049       <message name="helloHttpPostOut">
050         <part name="Body" element="s0:string"/>
051       </message>
052       <portType name="MyCompanySoap">
053         <operation name="hello">
054           <input message="s0:helloSoapIn"/>
055           <output message="s0:helloSoapOut"/>
056         </operation>
057       </portType>
058       <portType name="MyCompanyHttpGet">
059         <operation name="hello">
060           <input message="s0:helloHttpGetIn"/>
061           <output message="s0:helloHttpGetOut"/>
062         </operation>
063       </portType>
064       <portType name="MyCompanyHttpPost">
065         <operation name="hello">
066           <input message="s0:helloHttpPostIn"/>
067           <output message="s0:helloHttpPostOut"/>
068         </operation>
069       </portType>
070       <binding name="MyCompanySoap" type="s0:MyCompanySoap">
071         <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
072         <operation name="hello">
073           <soap:operation soapAction="http://workshop.bea.com/MyCompany/hello" style="document"/>
074           <input>
075             <soap:body use="literal"/>
076           </input>
077           <output>
078             <soap:body use="literal"/>
079           </output>
080         </operation>
081       </binding>
082       <binding name="MyCompanyHttpGet" type="s0:MyCompanyHttpGet">
083         <http:binding verb="GET"/>
084         <operation name="hello">
085           <http:operation location="/hello"/>
086           <input>
087             <http:urlEncoded/>
088           </input>
089           <output>
090             <mime:mimeXml part="Body"/>
091           </output>
092         </operation>
093       </binding>
094       <binding name="MyCompanyHttpPost" type="s0:MyCompanyHttpPost">
095         <http:binding verb="POST"/>
096         <operation name="hello">
097           <http:operation location="/hello"/>
098           <input>
099             <mime:content type="application/x-www-form-urlencoded"/>
100           </input>
101           <output>
102             <mime:mimeXml part="Body"/>
103           </output>
104         </operation>
105       </binding>
106       <service name="MyCompany">
107         <port name="MyCompanySoap" binding="s0:MyCompanySoap">
108           <soap:address location="http://localhost:7001/WebServices/security/wsse/reqResp/mycompany/MyCompany.jws"/>
109         </port>
110         <port name="MyCompanyHttpGet" binding="s0:MyCompanyHttpGet">
111           <http:address location="http://localhost:7001/WebServices/security/wsse/reqResp/mycompany/MyCompany.jws"/>
112         </port>
113         <port name="MyCompanyHttpPost" binding="s0:MyCompanyHttpPost">
114           <http:address location="http://localhost:7001/WebServices/security/wsse/reqResp/mycompany/MyCompany.jws"/>
115         </port>
116       </service>
117     </definitions>
118  * ::
119  */