AnsweredAssumed Answered

my custom webservice

Question asked by benjamin.dougherty on Feb 16, 2007
I have written a simple webservice which I have deployed in alfresco.

I am seeing a strange behaviour if I use element type Reference in a service operation the time to exectute that operation takes 10x longer. ie.

time taken for queryChildrenLevel=485ms
time taken for runSpringBean=47ms

They both do nothing but return a string "return".

Does anyone have any ideas as to why this might be?

my wsdl…

<?xml version="1.0" encoding="UTF-8"?>

<wsdl:definitions name="m33-service"
   targetNamespace="http://www.miles33.co.uk/ws/service/m33/1.0"
   xmlns:apachesoap="http://xml.apache.org/xml-soap"
   xmlns:m33="http://www.miles33.co.uk/ws/service/m33/1.0"
   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
   xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:cms="http://www.alfresco.org/ws/model/content/1.0">

   <wsdl:types>
      <schema elementFormDefault="qualified" targetNamespace="http://www.miles33.co.uk/ws/service/m33/1.0" xmlns="http://www.w3.org/2001/XMLSchema">
        
    <xsd:import namespace="http://www.alfresco.org/ws/model/content/1.0" schemaLocation="../wsdl/types.xsd"></xsd:import>
    
         <element name="queryChildrenLevel">
            <complexType>
               <sequence>
                  <element name="ref" type="cms:Reference"/>
                  <element name="level" type="xsd:int"/>
               </sequence>
            </complexType>
         </element>
        
         <element name="queryChildrenLevelResponse">
            <complexType>
               <sequence>
                  <element name="queryReturn" type="xsd:string"/>
               </sequence>
            </complexType>
         </element>
        
         <element name="runSpringBean">
            <complexType>
               <sequence>
                  <element name="xmlIn" type="xsd:string"/>
               </sequence>
            </complexType>
         </element>
        
         <element name="runSpringBeanResponse">
            <complexType>
               <sequence>
                  <element name="xmlReturn" type="xsd:string"/>
               </sequence>
            </complexType>
         </element>
        
      </schema>
   </wsdl:types>

   <wsdl:message name="queryChildrenLevelRequest">
      <wsdl:part element="m33:queryChildrenLevel" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="queryChildrenLevelResponse">
      <wsdl:part element="m33:queryChildrenLevelResponse" name="parameters"/>
   </wsdl:message>
  
   <wsdl:message name="runSpringBeanRequest">
      <wsdl:part element="m33:runSpringBean" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="runSpringBeanResponse">
      <wsdl:part element="m33:runSpringBeanResponse" name="parameters"/>
   </wsdl:message>
  
   <wsdl:portType name="M33ServiceSoapPort">
      <wsdl:operation name="queryChildrenLevel">
         <wsdl:documentation>Executes a query to retrieve the children of the specified resource.</wsdl:documentation>
         <wsdl:input message="m33:queryChildrenLevelRequest" name="queryChildrenLevelRequest"/>
         <wsdl:output message="m33:queryChildrenLevelResponse" name="queryChildrenLevelResponse"/>
      </wsdl:operation>
      <wsdl:operation name="runSpringBean">
         <wsdl:documentation>Executes a Spring Bean. The name of the Bean and any parameters are passed via xml. Returns xml.</wsdl:documentation>
         <wsdl:input message="m33:runSpringBeanRequest" name="runSpringBeanRequest"/>
         <wsdl:output message="m33:runSpringBeanResponse" name="runSpringBeanResponse"/>
      </wsdl:operation>
   </wsdl:portType>
  
   <wsdl:binding name="M33ServiceSoapBinding" type="m33:M33ServiceSoapPort">
      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http'/>
      <wsdl:operation name="queryChildrenLevel">
         <wsdl:documentation>Executes a query to retrieve the children of the specified resource.</wsdl:documentation>
         <wsdlsoap:operation soapAction="http://www.miles33.co.uk/ws/service/m33/1.0/queryChildrenLevel'/>
         <wsdl:input name="queryChildrenLevelRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="queryChildrenLevelResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="runSpringBean">
         <wsdl:documentation>Executes a Spring Bean. The name of the Bean and any parameters are passed via xml. Returns xml.</wsdl:documentation>
         <wsdlsoap:operation soapAction="http://www.miles33.co.uk/ws/service/m33/1.0/runSpringBean'/>
         <wsdl:input name="runSpringBeanRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="runSpringBeanResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
      </wsdl:operation>
   </wsdl:binding>

   <wsdl:service name="M33Service">
      <wsdl:documentation>Provides m33 proprietary operations.</wsdl:documentation>
      <wsdl:port binding="m33:M33ServiceSoapBinding" name="M33Service">
         <wsdlsoap:address location="http://localhost:8080/alfresco/api/M33Service'/>
      </wsdl:port>
   </wsdl:service>
  
</wsdl:definitions>

Outcomes