Hi,
as I just found out it seems the problem is the mixture of rpc and message 
style. The line generated in server-config.wsdd looks like this:  <service 
name="NMRShiftDB" provider="java:MSG" use="literal"> and this gives problems 
with method returning a string.
I either need to define them as two different services or make both services 
message-style. At least it seems possible.
I would have put them in one service since they are closely related, but this 
is not necessary, so I can do this.
Stefan


Am Wednesday 21 June 2006 18:55 schrieb Martin Gainty:
> Stefan-
>
> Are you attempting to execute 2 tasks asynchronously?
> If so why not break the design into 2 separate Axis services ..
> in this way each service request and response invocation can execute
> independently..
>
> Viel Gluck,
> Martin --
> *********************************************************************
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
>
>
>
> ----- Original Message -----
> From: "Stefan Kuhn" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Wednesday, June 21, 2006 11:35 AM
> Subject: Re: problem with two methods in service
>
> > Am Wednesday 21 June 2006 16:06 schrieben Sie:
> >> I don't believe that Axis let's you define two ports with the same
> >> access point.
> >>
> >> Rather than defining two different portTypes, each with its own
> >> associated binding, define one portType and one binding with two
> >> operations.
> >
> > Hi Anne,
> > thanks for your answer. Actually what I sent was some elaborated guess by
> > somebody how knows WSDL. My first suggestion was the following, which has
> > only one portType/binding. It actually gives the same problem, only one
> > method (doPrediction) recognized and all request go to this method.
> > Stefan
> >
> > BTW: I am using axis 1.4, if this helps
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <wsdl:definitions
> >  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> >  xmlns:tns="http://www.nmrshiftdb.org/ws/NMRShiftDB/";
> >  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> >  xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> >  xmlns:cml="http://www.xml-cml.org/schema";
> >  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
> >  name="NMRShiftDB"
> >  targetNamespace="http://www.nmrshiftdb.org/ws/NMRShiftDB/";>
> >  <wsdl:types>
> >    <xsd:schema
> >      targetNamespace="http://www.nmrshiftdb.org/ws/NMRShiftDB/";
> >      xmlns:cml="http://www.xml-cml.org/schema";>
> >      <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"; />
> >      <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"; />
> >      <xsd:import namespace="http://www.w3.org/2001/XMLSchema"; />
> >      <xsd:import
> >        namespace="http://www.xml-cml.org/schema";
> >        schemaLocation="http://almost.cubic.uni-koeln.de/schema.xsd"; />
> >      <xsd:element
> >        name="doPredictionResponse"
> >        type="cml:spectrumTypeType" />
> >      <xsd:element
> >        name="doPredictionRequest"
> >        type="tns:DoPredictionParameters" />
> >
> >      <xsd:complexType name="DoPredictionParameters">
> >        <xsd:sequence>
> >          <xsd:element
> >            ref="cml:molecule"
> >            minOccurs="1"
> >            maxOccurs="1" />
> >          <xsd:element
> >            name="spectrumTypeName"
> >            type="xsd:string" />
> >        </xsd:sequence>
> >      </xsd:complexType>
> >    </xsd:schema>
> >  </wsdl:types>
> >  <wsdl:message name="doPredictionResponse">
> >    <wsdl:part
> >      element="tns:doPredictionResponse"
> >      name="doPredictionResponse" />
> >  </wsdl:message>
> >  <wsdl:message name="doPredictionRequest">
> >    <wsdl:part
> >      element="tns:doPredictionRequest"
> >      name="doPredictionRequest" />
> >  </wsdl:message>
> >  <wsdl:message name="getSpectrumTypesResponse">
> >    <wsdl:part
> >      type="xsd:string"
> >      name="getSpectrumTypesResponse" />
> >  </wsdl:message>
> >  <wsdl:portType name="NMRShiftDB">
> >    <wsdl:operation name="doPrediction">
> >      <wsdl:input message="tns:doPredictionRequest" />
> >      <wsdl:output message="tns:doPredictionResponse" />
> >    </wsdl:operation>
> >    <wsdl:operation name="getSpectrumTypes">
> >      <wsdl:output message="tns:getSpectrumTypesResponse" />
> >    </wsdl:operation>
> >  </wsdl:portType>
> >  <wsdl:binding
> >    name="NMRShiftDBSOAP"
> >    type="tns:NMRShiftDB">
> >    <soap:binding
> >      style="document"
> >      transport="http://schemas.xmlsoap.org/soap/http"; />
> >    <wsdl:operation name="doPrediction">
> >      <soap:operation
> > soapAction="http://127.0.0.1:8080/axis/services/NMRShiftDB?method=doPredi
> >ction" /> <wsdl:input>
> >        <soap:body use="literal" />
> >      </wsdl:input>
> >      <wsdl:output>
> >        <soap:body use="literal" />
> >      </wsdl:output>
> >    </wsdl:operation>
> >    <wsdl:operation name="getSpectrumTypes">
> >      <soap:operation
> > soapAction="http://127.0.0.1:8080/axis/services/NMRShiftDB?method=getSpec
> >trumTypes" /> <wsdl:input>
> >        <soap:body use="literal" />
> >      </wsdl:input>
> >      <wsdl:output>
> >        <soap:body use="literal" />
> >      </wsdl:output>
> >    </wsdl:operation>
> >  </wsdl:binding>
> >  <wsdl:service name="NMRShiftDB">
> >    <wsdl:port
> >      binding="tns:NMRShiftDBSOAP"
> >      name="NMRShiftDBSOAP">
> >      <soap:address
> > location="http://127.0.0.1:8080/axis/services/NMRShiftDB"; />
> >    </wsdl:port>
> >  </wsdl:service>
> > </wsdl:definitions>
> >
> >> Anne
> >>
> >> On 6/21/06, Stefan Kuhn <[EMAIL PROTECTED]> wrote:
> >> > Hi all,
> >> > I have a web service, described via a wsdl. I deployed this, but it
> >> > seems only one method is recognized. When I go to
> >> > http://127.0.0.1:8080/axis/servlet/AxisServlet, only the doPrediction
> >> > method
> >> > is listed, but not getSpectrumTypes. Furthermore when using my client,
> >> > always
> >> > the doPrediction method is executed. I put in the relevant file, if
> >> > you need
> >> > any other information, please ask.
> >> >
> >> > The wsdl:
> >> > <?xml version="1.0" encoding="UTF-8"?>
> >> > <wsdl:definitions
> >> >   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> >> >   xmlns:tns="http://www.nmrshiftdb.org/ws/NMRShiftDB/";
> >> >   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> >> >   xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> >> >   xmlns:cml="http://www.xml-cml.org/schema";
> >> >   xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
> >> >   name="NMRShiftDB"
> >> >   targetNamespace="http://www.nmrshiftdb.org/ws/NMRShiftDB/";>
> >> >   <wsdl:types>
> >> >     <xsd:schema
> >> >       targetNamespace="http://www.nmrshiftdb.org/ws/NMRShiftDB/";
> >> >       xmlns:cml="http://www.xml-cml.org/schema";>
> >> >       <xsd:import
> >> > namespace="http://schemas.xmlsoap.org/soap/encoding/"; /> <xsd:import
> >> > namespace="http://schemas.xmlsoap.org/wsdl/"; /> <xsd:import
> >> > namespace="http://www.w3.org/2001/XMLSchema"; /> <xsd:import
> >> > namespace="http://www.xml-cml.org/schema";
> >> >         schemaLocation="http://almost.cubic.uni-koeln.de/schema.xsd";
> >> > /> <xsd:element
> >> >         name="doPredictionResponse"
> >> >         type="cml:spectrumTypeType" />
> >> >       <xsd:element
> >> >         name="doPredictionRequest"
> >> >         type="tns:DoPredictionParameters" />
> >> >       <xsd:complexType name="DoPredictionParameters">
> >> >         <xsd:sequence>
> >> >           <xsd:element
> >> >             ref="cml:molecule"
> >> >             minOccurs="1"
> >> >             maxOccurs="1" />
> >> >           <xsd:element
> >> >             name="spectrumTypeName"
> >> >             type="xsd:string" />
> >> >         </xsd:sequence>
> >> >       </xsd:complexType>
> >> >     </xsd:schema>
> >> >   </wsdl:types>
> >> >   <wsdl:message name="doPredictionResponse">
> >> >     <wsdl:part
> >> >       element="tns:doPredictionResponse"
> >> >       name="doPredictionResponse" />
> >> >   </wsdl:message>
> >> >   <wsdl:message name="doPredictionRequest">
> >> >     <wsdl:part
> >> >       element="tns:doPredictionRequest"
> >> >       name="doPredictionRequest" />
> >> >   </wsdl:message>
> >> >   <wsdl:message name="getSpectrumTypesResponse">
> >> >     <wsdl:part
> >> >       type="xsd:string"
> >> >       name="getSpectrumTypesResponse" />
> >> >   </wsdl:message>
> >> >   <wsdl:portType name="NMRShiftDB">
> >> >     <wsdl:operation name="doPrediction">
> >> >       <wsdl:input message="tns:doPredictionRequest" />
> >> >       <wsdl:output message="tns:doPredictionResponse" />
> >> >     </wsdl:operation>
> >> >   </wsdl:portType>
> >> >   <wsdl:portType name="NMRShiftDBOneWay">
> >> >     <wsdl:operation name="getSpectrumTypes">
> >> >       <wsdl:output
> >> > message="tns:getSpectrumTypesResponse"></wsdl:output>
> >> > </wsdl:operation>
> >> >   </wsdl:portType>
> >> >   <wsdl:binding
> >> >     name="NMRShiftDBSOAP"
> >> >     type="tns:NMRShiftDB">
> >> >     <soap:binding
> >> >       style="document"
> >> >       transport="http://schemas.xmlsoap.org/soap/http"; />
> >> >     <wsdl:operation name="doPrediction">
> >> >       <soap:operation
> >> > soapAction="
> >> > http://www.nmrshiftdb.org/axis/services/NMRShiftDB?method=doPredi
> >> > ction" /> <wsdl:input>
> >> >         <soap:body use="literal" />
> >> >       </wsdl:input>
> >> >       <wsdl:output>
> >> >         <soap:body use="literal" />
> >> >       </wsdl:output>
> >> >     </wsdl:operation>
> >> >   </wsdl:binding>
> >> >   <wsdl:binding
> >> >     name="NMRShiftDBOneWaySOAP"
> >> >     type="tns:NMRShiftDBOneWay">
> >> >     <soap:binding
> >> >       style="document"
> >> >       transport="http://schemas.xmlsoap.org/soap/http"; />
> >> >     <wsdl:operation name="getSpectrumTypes">
> >> >       <soap:operation
> >> > soapAction="http://www.nmrshiftdb.org/ws/NMRShiftDB/getSpectrumTypes";
> >> > /> <wsdl:output>
> >> >         <soap:body use="literal" />
> >> >       </wsdl:output>
> >> >     </wsdl:operation>
> >> >   </wsdl:binding>
> >> >   <wsdl:service name="NMRShiftDB">
> >> >     <wsdl:port
> >> >       binding="tns:NMRShiftDBSOAP"
> >> >       name="NMRShiftDBSOAP">
> >> >       <soap:address
> >> > location="http://almost.cubic.uni-koeln.de/axis/services/NMRShiftDB";
> >> > /> </wsdl:port>
> >> >     <wsdl:port
> >> >       binding="tns:NMRShiftDBOneWaySOAP"
> >> >       name="NMRShiftDBOneWaySOAP">
> >> >       <soap:address
> >> > location="http://almost.cubic.uni-koeln.de/axis/services/NMRShiftDB";
> >> > /> </wsdl:port>
> >> >   </wsdl:service>
> >> > </wsdl:definitions>
> >> >
> >> > The wsdd:
> >> > <deployment
> >> >     xmlns="http://xml.apache.org/axis/wsdd/";
> >> >     xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
> >> >   <!-- Services from serviceName WSDL service -->;
> >> >   <service name="NMRShiftDB" provider="java:MSG" use="literal">
> >> >       <!-- Definitions for the SOAPMonitor (optional) -->
> >> >       <!--<requestFlow>
> >> >           <handler type="soapmonitor"/>
> >> >       </requestFlow>
> >> >       <responseFlow>
> >> >           <handler type="soapmonitor"/>
> >> >       </responseFlow>-->
> >> >       <!-- End of the definitions for the SOAPMonitor -->
> >> >       <parameter name="className"
> >> > value="org.openscience.nmrshiftdb.webservices.NMRShiftDBServiceBinding
> >> >Imp l "/>
> >> > <parameter name="allowedMethods" value="*"/>
> >> >       <wsdlFile>NMRShiftDB.wsdl</wsdlFile>
> >> >   </service>
> >> > </deployment>
> >> >
> >> > Finally my client code which should call getSpectrumTypes. It calls
> >> > doPrediction actually:
> >> > public void testGetSpectrumTypes() throws Exception{
> >> >   Options opts = new Options(new String[0]);
> >> >   // Modify it to the location of your service
> >> >   opts.setDefaultURL("http://"+server+"/axis/services/NMRShiftDB";);
> >> >   Service service = new Service();
> >> >   Call call = (Call) service.createCall();
> >> >   call.setOperationName("getSpectrumTypes");
> >> >   call.setTargetEndpointAddress( new URL(opts.getURL()) );
> >> >   DocumentBuilder builder;
> >> >   builder =
> >> > DocumentBuilderFactory.newInstance().newDocumentBuilder();
> >> >   SOAPBodyElement[] input = new SOAPBodyElement[1];
> >> >   Document doc = builder.newDocument();
> >> >   Element cdataElem;
> >> >   cdataElem =
> >> > doc.createElementNS("http://www.nmrshiftdb.org/ws/NMRShiftDB/";,
> >> > "getSpectrumTypes");
> >> >   Element reqElem;
> >> >   reqElem =
> >> > doc.createElementNS("http://www.nmrshiftdb.org/ws/NMRShiftDB/";,
> >> > "spectrumTypeName");
> >> >   Node node;
> >> >   node = doc.createTextNode("13C");
> >> >   reqElem.appendChild(node);
> >> >   String filename = "org/openscience/nmrshiftdb/tests/butadiene.cml";
> >> >   InputStream ins =
> >> > this.getClass().getClassLoader().getResourceAsStream(filename);
> >> >
> >> >   Document document = builder.parse(ins);
> >> >   Node
> >> > nodeimp=doc.importNode(document.getChildNodes().item(0),true);
> >> >   cdataElem.appendChild(nodeimp);
> >> >   cdataElem.appendChild(reqElem);
> >> >   input[0] = new SOAPBodyElement(cdataElem);
> >> >   System.out.println(input[0].toString());
> >> >
> >> >
> >> >   Vector elems = (Vector) call.invoke( input );
> >> >   SOAPBodyElement elem = null ;
> >> >   Element e = null ;
> >> >   elem = (SOAPBodyElement) elems.get(0);
> >> >   e = elem.getAsDOM();
> >> >   System.err.println(XMLUtils.ElementToString(e));
> >> >   assertEquals(1,e.getChildNodes().getLength());
> >> > }
> >> >
> >> > It would be great if you could help me with this problem
> >> > Stefan
> >> > --
> >> > Stefan Kuhn M. A.
> >> > Cologne University BioInformatics Center
> >> > (http://www.cubic.uni-koeln.de) Zülpicher Str. 47, 50674 Cologne
> >> > Tel: +49(0)221-470-7428   Fax: +49 (0) 221-470-7786
> >> > My public PGP key is available at http://pgp.mit.edu
> >> >
> >> > -------------------------------------------------------
> >> >
> >> > --
> >> > Stefan Kuhn M. A.
> >> > Cologne University BioInformatics Center
> >> > (http://www.cubic.uni-koeln.de) Zülpicher Str. 47, 50674 Cologne
> >> > Tel: +49(0)221-470-7428   Fax: +49 (0) 221-470-7786
> >> > My public PGP key is available at http://pgp.mit.edu
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > --
> > Stefan Kuhn M. A.
> > Cologne University BioInformatics Center (http://www.cubic.uni-koeln.de)
> > Zülpicher Str. 47, 50674 Cologne
> > Tel: +49(0)221-470-7428   Fax: +49 (0) 221-470-7786
> > My public PGP key is available at http://pgp.mit.edu
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Stefan Kuhn M. A.
Cologne University BioInformatics Center (http://www.cubic.uni-koeln.de)
Zülpicher Str. 47, 50674 Cologne
Tel: +49(0)221-470-7428   Fax: +49 (0) 221-470-7786
My public PGP key is available at http://pgp.mit.edu

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to