Please log a JIRA issue and then upload your wsdl. it has gotten too
mangled in the email message.
thanks,
dims
On 9/28/06, Xia Zhao <[EMAIL PROTECTED]> wrote:
Hi everyone,
I am new to AXIS2 and have a question of correctly invoking the service. I
developed an asynchronous web service and built an archive file to be
deployed on my local server. There's no error during deploying. This is the
wsdl file.
- <wsdl:definitions
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:ns1="http://AnalysisMethod1.analysis.earlylife.org/types"
xmlns:ns="http://AnalysisMethod1.analysis.earlylife.org"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
targetNamespace="http://AnalysisMethod1.analysis.earlylife.org">
- <wsdl:types>
- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:types="http://AnalysisMethod1.analysis.earlylife.org/types"
xmlns:stn_3="http://analysis.earlylife.org/xsd"
targetNamespace="http://AnalysisMethod1.analysis.earlylife.org/types"
elementFormDefault="unqualified" attributeFormDefault="unqualified">
<xs:import namespace="http://analysis.earlylife.org/xsd"
/>
<xs:element type="ns1:Job" name="Job" />
- <xs:complexType name="Job">
- <xs:sequence>
<xs:element type="stn_3:AnalysisMethod" name="method" />
<xs:element type="xs:string" name="status" />
<xs:element type="xs:string" name="userName" />
<xs:element type="xs:string" name="caseName" />
<xs:element type="xs:dateTime" name="requestTime" />
</xs:sequence>
</xs:complexType>
<xs:element type="ns1:AnalysisMethod" name="AnalysisMethod" />
- <xs:complexType name="AnalysisMethod">
- <xs:sequence>
<xs:element type="xs:string" name="name" />
<xs:element type="xs:string" name="version" />
</xs:sequence>
</xs:complexType>
- <xs:element name="receiveRequest">
- <xs:complexType>
- <xs:sequence>
<xs:element type="stn_3:Job" name="job" />
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="receiveRequestResponse">
- <xs:complexType>
- <xs:sequence>
<xs:element type="stn_3:Job" name="received_job" />
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="doAnalysis">
- <xs:complexType>
- <xs:sequence>
<xs:element type="stn_3:Job" name="job" />
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="doAnalysisResponse">
- <xs:complexType>
- <xs:sequence>
<xs:element type="stn_3:Job" name="executing_job" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
- <wsdl:message name="doAnalysisMessage">
<wsdl:part element="ns1:doAnalysis" name="part1" />
</wsdl:message>
- <wsdl:message name="doAnalysisResponseMessage">
<wsdl:part element="ns1:doAnalysisResponse" name="part1" />
</wsdl:message>
- <wsdl:message name="receiveRequestMessage">
<wsdl:part element="ns1:receiveRequest" name="part1" />
</wsdl:message>
- <wsdl:message name="receiveRequestResponseMessage">
<wsdl:part element="ns1:receiveRequestResponse" name="part1" />
</wsdl:message>
- <wsdl:portType name="AnalysisMethod1PortType">
- <wsdl:operation name="doAnalysis">
<wsdl:input message="ns:doAnalysisMessage" />
<wsdl:output message="ns:doAnalysisResponseMessage" />
</wsdl:operation>
- <wsdl:operation name="receiveRequest">
<wsdl:input message="ns:receiveRequestMessage" />
<wsdl:output message="ns:receiveRequestResponseMessage"
/>
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding type="ns:AnalysisMethod1PortType"
name="AnalysisMethod1SOAP11Binding">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="doAnalysis">
<soap:operation style="document" soapAction="urn:doAnalysis" />
- <wsdl:input>
<soap:body
namespace="http://AnalysisMethod1.analysis.earlylife.org"
use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body
namespace="http://AnalysisMethod1.analysis.earlylife.org"
use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="receiveRequest">
<soap:operation style="document" soapAction="urn:receiveRequest" />
- <wsdl:input>
<soap:body
namespace="http://AnalysisMethod1.analysis.earlylife.org"
use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body
namespace="http://AnalysisMethod1.analysis.earlylife.org"
use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:binding type="ns:AnalysisMethod1PortType"
name="AnalysisMethod1SOAP12Binding">
<soap12:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="doAnalysis">
<soap12:operation style="document" soapAction="urn:doAnalysis" />
- <wsdl:input>
<soap12:body
namespace="http://AnalysisMethod1.analysis.earlylife.org"
use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body
namespace="http://AnalysisMethod1.analysis.earlylife.org"
use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="receiveRequest">
<soap12:operation style="document" soapAction="urn:receiveRequest" />
- <wsdl:input>
<soap12:body
namespace="http://AnalysisMethod1.analysis.earlylife.org"
use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body
namespace="http://AnalysisMethod1.analysis.earlylife.org"
use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:binding type="ns:AnalysisMethod1PortType"
name="AnalysisMethod1HttpBinding">
<http:binding verb="POST" />
- <wsdl:operation name="doAnalysis">
<http:operation location="doAnalysis" />
- <wsdl:input>
<mime:content type="text/xml" />
</wsdl:input>
- <wsdl:output>
<mime:content type="text/xml" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="receiveRequest">
<http:operation location="receiveRequest" />
- <wsdl:input>
<mime:content type="text/xml" />
</wsdl:input>
- <wsdl:output>
<mime:content type="text/xml" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="AnalysisMethod1">
- <wsdl:port binding="ns:AnalysisMethod1SOAP11Binding"
name="AnalysisMethod1SOAP11port0">
<soap:address
location="http://localhost:8080/axis2/services/AnalysisMethod1"
/>
</wsdl:port>
- <wsdl:port binding="ns:AnalysisMethod1SOAP12Binding"
name="AnalysisMethod1SOAP12port0">
<soap12:address
location="http://localhost:8080/axis2/services/AnalysisMethod1"
/>
</wsdl:port>
- <wsdl:port binding="ns:AnalysisMethod1HttpBinding"
name="AnalysisMethod1Httpport0">
<http:address
location="http://localhost:8080/axis2/rest/AnalysisMethod1"
/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
The following is the code I try to invoke the service:
public class Test {
/**
* @param args
*/
public static void main(String[] args) throws Exception{
AnalysisMethod1Stub reqComputing = new
AnalysisMethod1Stub();
ReceiveRequest rr = new ReceiveRequest();
OMFactory factory = OMAbstractFactory.getOMFactory();
OMNamespace ns =
factory.createOMNamespace("http://AnalysisMethod1.analysis.earlylife.org/types",
"ns1");
OMElement job = factory.createOMElement("job", ns);
job.addAttribute("status", "request", ns);
rr.setJob(job);
...
[Message clipped]
--
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]