You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ch...@apache.org on 2005/06/30 11:33:47 UTC
svn commit: r202512 - in /webservices/axis/trunk/java:
modules/samples/src/sample/google/search/ClientUtil.java xdocs/navigation.xml
Author: chinthaka
Date: Thu Jun 30 02:33:45 2005
New Revision: 202512
URL: http://svn.apache.org/viewcvs?rev=202512&view=rev
Log:
- committing updated Google search client util for gayan
- added rest-ws.html to navigation.xml of the site
Modified:
webservices/axis/trunk/java/modules/samples/src/sample/google/search/ClientUtil.java
webservices/axis/trunk/java/xdocs/navigation.xml
Modified: webservices/axis/trunk/java/modules/samples/src/sample/google/search/ClientUtil.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/sample/google/search/ClientUtil.java?rev=202512&r1=202511&r2=202512&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/sample/google/search/ClientUtil.java (original)
+++ webservices/axis/trunk/java/modules/samples/src/sample/google/search/ClientUtil.java Thu Jun 30 02:33:45 2005
@@ -42,9 +42,11 @@
/**
* method getMessageContext
+ *
* @return msgContext
*/
- public static MessageContext getMessageContext(AsynchronousClient asyncClient) throws DeploymentException {
+ public static MessageContext getMessageContext(AsynchronousClient asyncClient)
+ throws DeploymentException {
OMNamespace defNs;
OMElement operation;
MessageContext msgContext = null;
@@ -54,12 +56,9 @@
defNs = OMAbstractFactory.getSOAP11Factory().createOMNamespace("", "");
SOAPFactory omFactory = OMAbstractFactory.getSOAP11Factory();
SOAPEnvelope envelope = omFactory.getDefaultEnvelope();
- envelope.declareNamespace(
- "http://schemas.xmlsoap.org/soap/envelope/", "SOAP-ENV");
- envelope.declareNamespace(
- "http://schemas.xmlsoap.org/soap/encoding/", "SOAP-ENC");
- envelope.declareNamespace(
- "http://www.w3.org/1999/XMLSchema-instance/", "xsi");
+ envelope.declareNamespace("http://schemas.xmlsoap.org/soap/envelope/", "SOAP-ENV");
+ envelope.declareNamespace("http://schemas.xmlsoap.org/soap/encoding/", "SOAP-ENC");
+ envelope.declareNamespace("http://www.w3.org/1999/XMLSchema-instance/", "xsi");
envelope.declareNamespace("http://www.w3.org/1999/XMLSchema",
"xsd");
@@ -68,16 +67,16 @@
operation.addAttribute("SOAP-ENV:encordingStyle",
"http://schemas.xmlsoap.org/soap/encoding/", null);
- operation.addChild(getOMElement(omFactory,defNs,"oe","xsd:string","latin1"));
- operation.addChild(getOMElement(omFactory,defNs,"ie","xsd:string","latin1"));
- operation.addChild(getOMElement(omFactory,defNs,"lr","xsd:string",""));
- operation.addChild(getOMElement(omFactory,defNs,"safeSearch","xsd:boolean","false"));
- operation.addChild(getOMElement(omFactory,defNs,"restrict","xsd:string",""));
- operation.addChild(getOMElement(omFactory,defNs,"filter","xsd:boolean","true"));
- operation.addChild(getOMElement(omFactory,defNs,"maxResults","xsd:int","10"));
- operation.addChild(getOMElement(omFactory,defNs,"start","xsd:int",str_ST_index));
- operation.addChild(getOMElement(omFactory,defNs,"q","xsd:string",asyncClient.getSearch()));
- operation.addChild(getOMElement(omFactory,defNs,"key","xsd:string",asyncClient.getKey()));
+ operation.addChild(getOMElement(omFactory, defNs, "key", "xsd:string", asyncClient.getKey()));
+ operation.addChild(getOMElement(omFactory, defNs, "q", "xsd:string", asyncClient.getSearch()));
+ operation.addChild(getOMElement(omFactory, defNs, "start", "xsd:int", str_ST_index));
+ operation.addChild(getOMElement(omFactory, defNs, "maxResults", "xsd:int", "10"));
+ operation.addChild(getOMElement(omFactory, defNs, "filter", "xsd:boolean", "true"));
+ operation.addChild(getOMElement(omFactory, defNs, "restrict", "xsd:string", ""));
+ operation.addChild(getOMElement(omFactory, defNs, "safeSearch", "xsd:boolean", "false"));
+ operation.addChild(getOMElement(omFactory, defNs, "lr", "xsd:string", ""));
+ operation.addChild(getOMElement(omFactory, defNs, "ie", "xsd:string", "latin1"));
+ operation.addChild(getOMElement(omFactory, defNs, "oe", "xsd:string", "latin1"));
ConfigurationContextFactory fac = new ConfigurationContextFactory();
ConfigurationContext configContext = fac.buildClientConfigurationContext("doGoogleSearch");
@@ -90,7 +89,8 @@
return msgContext;
}
- private static OMElement getOMElement(OMFactory factory,OMNamespace ns,String elementName,String type,String text){
+ private static OMElement getOMElement(OMFactory factory, OMNamespace ns, String elementName,
+ String type, String text) {
OMElement part = factory.createOMElement(elementName, ns);
part.addAttribute("xsi:type", type, null);
part.addChild(factory.createText(text));
Modified: webservices/axis/trunk/java/xdocs/navigation.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/xdocs/navigation.xml?rev=202512&r1=202511&r2=202512&view=diff
==============================================================================
--- webservices/axis/trunk/java/xdocs/navigation.xml (original)
+++ webservices/axis/trunk/java/xdocs/navigation.xml Thu Jun 30 02:33:45 2005
@@ -23,6 +23,7 @@
<item name="Web Administration Guide" href="webadminguide.html" />
<item name="AXIOM Tutorial" href="OMTutorial.html" />
<item name="Code Generation Tutorial" href="CodegenToolReference.html" />
+ <item name="REST Support" href="rest-ws.html" />
<item name="M1 Documents" href="m1.html" />
</item>